-
Notifications
You must be signed in to change notification settings - Fork 57
/
supervisor.conf
61 lines (52 loc) · 1.72 KB
/
supervisor.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
[unix_http_server]
file=/var/run/supervisor.sock
[supervisord]
nodaemon=true
user=root
logfile=/tmp/supervisord.log
pidfile=/tmp/supervisord.pid
loglevel=info
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[program:cloudflared_persist]
command=bash -c 'if source /app/env_vars.sh && [ -n "$ARGO_AUTH" ]; then cloudflared --no-autoupdate tunnel --edge-ip-version auto --protocol http2 run --token "$ARGO_AUTH"; else supervisorctl stop cloudflared_persist; fi'
redirect_stderr=false
autorestart=true
startretries=3
[program:cloudflared]
command=cloudflared tunnel --url http://localhost:8080 --no-autoupdate
redirect_stderr=false
autorestart=true
startretries=3
stdout_events_enabled=1
stderr_events_enabled=1
events=PROCESS_STATE,PROCESS_LOG
[eventlistener:cloudflared_monitor]
command=/app/monitor.sh
environment=VERBOSE_LEVEL=1
events=PROCESS_STATE,PROCESS_LOG
buffer_size=32
[program:bridge]
command=/bin/bash -c "cat /app/config.base64 | base64 --decode | /app/$(cat /app/exec.txt) run"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
autorestart=false
startretries=0
[program:nginx]
command=nginx -g 'daemon off;'
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
autorestart=false
startretries=0
[program:agent]
command=bash -c 'if source /app/env_vars.sh && [ -n "$AGENT" ]; then /app/agent $AGENT; else supervisorctl stop agent; fi'
redirect_stderr=false
autorestart=true
startretries=3