-
Notifications
You must be signed in to change notification settings - Fork 1
/
supervisor-mupif.conf
89 lines (76 loc) · 2.61 KB
/
supervisor-mupif.conf
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
##
## system stuff first
##
[supervisord]
nodaemon=true
user=root
environment: PYTHONUNBUFFERED=1
childlogdir=%(ENV_MUPIF_PERSIST_DIR)s/logs
logfile_maxbytes=10_000_000
logfile_backups=3
logfile=%(ENV_MUPIF_PERSIST_DIR)s/logs/supervisord.log
nocleanup=false
[program:wireguard]
command=/usr/bin/wg-quick up %(ENV_MUPIF_PERSIST_DIR)s/%(ENV_MUPIF_VPN_NAME)s.conf
# default priority for the rest is 999
priority=10
startsecs=0
exitcodes=0
[program:sshd-dirs]
autorestart=0
startsecs=0
priority=5
command=/bin/mkdir -p -m 0600 /run/sshd
[program:sshd]
environment=
user=root
command=/usr/sbin/sshd -D -e -p22 -oLogLevel=VERBOSE -oPasswordAuthentication=no -oAuthorizedKeysFile=authorized_keys
[program:xtail]
command=/usr/bin/xtail -f %(ENV_MUPIF_PERSIST_DIR)s/logs
user=root
stdout_logfile=/proc/1/fd/1
stderr_logfile=/proc/1/fd/1
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
##
## MuPIF (mupifDB in a separate file)
##
[program:dirs]
command=/bin/mkdir -m ugo+rwx -p %(ENV_MUPIF_PERSIST_DIR)s/mongodb %(ENV_MUPIF_HOME_DIR)s/nameserver /run/mongodb /var/log/mongodb
autorestart=0
startsecs=0
priority=5
[program:mongo-dirs]
command=/bin/chown mongodb: %(ENV_MUPIF_PERSIST_DIR)s/mongodb /var/log/mongodb
autorestart=0
startsecs=0
priority=4
[program:nameserver-dirs]
# in case UIDs change (docker refreshed)
autorestart=0
startsecs=0
priority=5
command=/bin/chown mupif: %(ENV_MUPIF_PERSIST_DIR)s/nameserver.sqlite
# not an error if the file does not exist (yet)
exitcodes=0,1
[program:nameserver]
environment=PYRO_NS_AUTOCLEAN=60,PYRO_LOGLEVEL=DEBUG,PYRO_SERVERTYPE=multiplex,nonsense_so_that_previous_vars_are_honored_WTF___=0
command=/usr/local/bin/pyro5-ns --host %(ENV_INADDR_ANY)s --port %(ENV_MUPIF_NS_PORT)s --storage=sql:%(ENV_MUPIF_PERSIST_DIR)s/nameserver.sqlite
user=mupif
directory=%(ENV_MUPIF_HOME_DIR)s/nameserver
[program:mupif-monitor-old]
environment=PYTHONPATH=%(ENV_MUPIF_HOME_DIR)s/monitor-old,MUPIF_MONITOR_ARGS="--config=%(ENV_MUPIF_PERSIST_DIR)s/monitor-vpn.conf:--mupifconfig=%(ENV_MUPIF_PERSIST_DIR)s/monitor-mupif.conf"
directory=%(ENV_MUPIF_HOME_DIR)s/monitor-old
user=mupif
command=/usr/bin/python3 -m bottle --bind=%(ENV_INADDR_ANY_WITH_PORT)s:8000 monitor
[program:ex13]
environment=MUPIF_LOG_LEVEL=DEBUG,nonsense=0
user=mupif
# creates server.log in the current directory, but the output is also in supervisors captured stdout/stderr
directory=/tmp
command=/usr/bin/python3 %(ENV_MUPIF_HOME_DIR)s/mupif-git/examples/13/server.py
[program:munin-node]
# don't try to connect to IPv6 :: (not availale in Docker): https://github.com/munin-monitoring/munin/issues/1501
environment=NO_IPV6=1
user=root
command=/usr/sbin/munin-node