diff --git a/v5/supervisor/Dockerfile b/v5/supervisor/Dockerfile new file mode 100644 index 0000000..86c412a --- /dev/null +++ b/v5/supervisor/Dockerfile @@ -0,0 +1,13 @@ +FROM invoiceninja/invoiceninja:5 + +USER root + +RUN apk add --no-cache supervisor \ + && mkdir /var/log/supervisord /var/run/supervisord \ + && chown $INVOICENINJA_USER:www-data /var/log/supervisord /var/run/supervisord + +COPY supervisord.conf / + +USER $INVOICENINJA_USER + +CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] diff --git a/v5/supervisor/supervisord.conf b/v5/supervisor/supervisord.conf new file mode 100644 index 0000000..f8fda83 --- /dev/null +++ b/v5/supervisor/supervisord.conf @@ -0,0 +1,30 @@ +[supervisord] +nodaemon=true +user=invoiceninja +logfile=/var/log/supervisord/supervisord.log +pidfile=/var/run/supervisord/supervisord.pid +childlogdir=/var/log/supervisord/ +logfile_maxbytes=50MB ; maximum size of logfile before rotation +logfile_backups=10 ; number of backed up logfiles +loglevel=error + +[program:php-fpm] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=php-fpm + +[program:scheduler] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=php artisan schedule:work + +[program:queue-worker] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=php artisan queue:listen