forked from thaibault/reverse-proxy-middleware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
systemd.service
40 lines (32 loc) · 1.35 KB
/
systemd.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
# region header
# Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
# License
# -------
# This library written by Torben Sickert stand under a creative commons naming
# 3.0 unported license. See https://creativecommons.org/licenses/by/3.0/deed.de
# endregion
[Unit]
Description=Bot blocker service.
After=docker.service
BindsTo=docker.service
Conflicts=shutdown.target reboot.target halt.target
[Service]
# Without any proxy:
#ExecStart=/usr/bin/env docker run --env PORT=80 --interactive --name reverse-proxy-middleware --publish 0.0.0.0:80:80 --rm ghcr.io/thaibault/reverse-proxy-middleware:latest
# With proxy
ExecStartPre=-/usr/bin/env docker network create proxy
ExecStart=/usr/bin/env docker run --env PORT=80 --expose 80 --interactive --log-opt max-size=10m --name reverse-proxy-middleware --network proxy --rm --volume "/srv/http/reverse-proxy-middleware/configuration.json:/application/configuration.json" ghcr.io/thaibault/reverse-proxy-middleware:latest
ExecStop=/usr/bin/env docker stop reverse-proxy-middleware
NotifyAccess=all
# NOTE: Will be handled by docker.
Restart=always
RestartSec=10
User=root
WorkingDirectory=/srv/http/reverse-proxy-middleware
[Install]
WantedBy=multi-user.target
# region vim modline
# vim: set tabstop=4 shiftwidth=4 expandtab:
# vim: foldmethod=marker foldmarker=region,endregion:
# endregion