-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Can we have an additional variable like ENABLE_SUPERVISOR? And this is going to install the supervisor, config file and run. For the sake of database queues. For example, it might look like this.
-
Dockerfile
RUN apt-get update && apt-get install -y supervisor
COPY october-worker.conf /etc/supervisor/conf.d/october-worker.conf
ADD ./run.sh /run.sh
RUN chmod a+x /run.sh -
run.sh
#!/bin/sh
set -e
php artisan october:up
exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf -
october-worker.conf
[program:october-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/local/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=4
redirect_stderr=true
stdout_logfile=/var/www/html/worker.log
Making sense?