Update cron file, use supervisor.

This commit is contained in:
James Cole
2018-08-18 14:08:28 +02:00
parent 35bacf2ad0
commit 004807aa32
7 changed files with 79 additions and 24 deletions

View File

@@ -0,0 +1,11 @@
[program:cron]
command=/usr/sbin/cron -f -L 15
user=root
autostart=true
autorestart=true
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
startsecs=10
startretries=3

View File

@@ -1 +0,0 @@
* * * * * root /artisan schedule:run >> /var/log/cron.log

View File

@@ -26,6 +26,4 @@ cat .env.docker | envsubst > .env
composer dump-autoload
php artisan package:discover
php artisan firefly:instructions install
service rsyslog start
service cron start
exec apache2-foreground
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf --nodaemon

View File

@@ -0,0 +1,6 @@
[program:apache2]
command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

View File

@@ -0,0 +1,30 @@
# supervisor config file
# Adapted from the config file distributed with the supervisor package on Debian
# Jessie
# Enable supervisord in non-daemon mode. Disable the logfile as we receive
# log messages via stdout/err. Set up the child process log directory in case
# the user doesn't set logging to stdout/err.
[supervisord]
nodaemon = true
logfile = NONE
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
loglevel=debug
# Enable supervisorctl via RPC interface over Unix socket
[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
# Include conf files for child processes
# Debian/Ubuntu packages use /etc/supervisor/conf.d
[include]
files = /etc/supervisor/conf.d/*.conf