diff --git a/examples/v5/supervisor/Dockerfile b/examples/v5/supervisor/Dockerfile new file mode 100644 index 0000000..86c412a --- /dev/null +++ b/examples/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/examples/v5/supervisor/supervisord.conf b/examples/v5/supervisor/supervisord.conf new file mode 100644 index 0000000..0bd7ad3 --- /dev/null +++ b/examples/v5/supervisor/supervisord.conf @@ -0,0 +1,28 @@ +[supervisord] +nodaemon=true +user=invoiceninja +pidfile=/var/run/supervisord/supervisord.pid +logfile=/dev/null ; nodaemon will cause logs to go to stdout +logfile_maxbytes=0 +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