mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-02-04 21:27:10 +01:00
Merge pull request #270 from tms0/supervisor_v5
Add example to run php-fpm, scheduler and queue worker in the same container with supervisor
This commit is contained in:
13
examples/v5/supervisor/Dockerfile
Normal file
13
examples/v5/supervisor/Dockerfile
Normal file
@@ -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"]
|
||||||
28
examples/v5/supervisor/supervisord.conf
Normal file
28
examples/v5/supervisor/supervisord.conf
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user