-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupervisord.conf
More file actions
68 lines (59 loc) · 2.22 KB
/
Copy pathsupervisord.conf
File metadata and controls
68 lines (59 loc) · 2.22 KB
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
; Supervisor — runs the whole Flarum web tier and workers in one container.
; Program commands are ported verbatim from the proven private stack:
; php-fpm -> php-fpm -F
; nginx -> nginx -g "daemon off;"
; cron -> cron -f (Flarum scheduler)
; flarum-horizon -> php /var/www/html/flarum horizon --verbose (queue/Horizon worker)
; flarum-realtime -> php /var/www/html/flarum realtime:serve --ignore-extension-toggles (ws :6001)
;
; The realtime program honours REALTIME_ENABLED (inherited from the container
; env): when not "true" it idles instead of crash-looping.
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[program:php-fpm]
command=php-fpm -F
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/php-fpm.log
stderr_logfile=/var/log/supervisor/php-fpm_err.log
[program:nginx]
command=nginx -g "daemon off;"
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/nginx.log
stderr_logfile=/var/log/supervisor/nginx_err.log
[program:cron]
command=cron -f
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/cron.log
stderr_logfile=/var/log/supervisor/cron_err.log
[program:flarum-horizon]
command=php /var/www/html/flarum horizon --verbose
directory=/var/www/html
user=www-data
autostart=true
autorestart=true
stopwaitsecs=3600
environment=COMPOSER_MEMORY_LIMIT="-1",COMPOSER_HOME="/var/www/html/storage/composer-cache"
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/horizon.log
[program:flarum-realtime]
command=/bin/sh -c 'if [ "$REALTIME_ENABLED" = "true" ]; then exec php /var/www/html/flarum realtime:serve --ignore-extension-toggles; else echo "REALTIME_ENABLED!=true; realtime ws server idle"; exec sleep infinity; fi'
directory=/var/www/html
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/www/html/storage/logs/realtime.log
stderr_logfile=/var/www/html/storage/logs/realtime_err.log