Fix supervisor
All checks were successful
Push image to registry / build-image (push) Successful in 6m46s
All checks were successful
Push image to registry / build-image (push) Successful in 6m46s
This commit is contained in:
@ -53,7 +53,8 @@ RUN apk update && apk add --no-cache \
|
||||
nginx \
|
||||
openssl \
|
||||
linux-headers \
|
||||
supervisor
|
||||
supervisor \
|
||||
&& rm -rf /tmp/* /var/cache/apk/*
|
||||
|
||||
RUN docker-php-ext-configure zip && docker-php-ext-install zip
|
||||
RUN docker-php-ext-install gd pdo pdo_mysql zip
|
||||
@ -78,7 +79,8 @@ RUN composer install --no-interaction --prefer-dist
|
||||
|
||||
# Supervisor
|
||||
COPY ./docker/datbrowserQueueWorker.conf /etc/supervisor/conf.d/datbrowserQueueWorker.conf
|
||||
RUN sudo supervisorctl reread && sudo supervisorctl reread && sudo supervisorctl update
|
||||
COPY ./docker/supervisord.conf /etc/supervisord.conf
|
||||
# RUN supervisorctl reread && supervisorctl update
|
||||
|
||||
# CRON
|
||||
RUN echo "* * * * * cd ${wd} && php artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/root
|
||||
|
@ -1,12 +1,12 @@
|
||||
[program:laravel-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php %(wd)/artisan queue:work --queue=high,default --tries=3 --timeout=300 --sleep=3 --no-interaction
|
||||
command=php /var/www/artisan queue:work --queue=high,default --tries=3 --timeout=300 --sleep=3 --no-interaction
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=forge
|
||||
numprocs=8
|
||||
user=root
|
||||
numprocs=1
|
||||
redirect_stderr=true
|
||||
stdout_logfile=%(wd)/worker.log
|
||||
stdout_logfile=/var/www/worker.log
|
||||
stopwaitsecs=3600
|
||||
|
7
docker/supervisord.conf
Normal file
7
docker/supervisord.conf
Normal file
@ -0,0 +1,7 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
|
||||
[include]
|
||||
files = /etc/supervisor/conf.d/*.conf
|
||||
|
@ -7,6 +7,7 @@ php ./artisan migrate --force
|
||||
php ./artisan optimize:clear && php ./artisan optimize
|
||||
|
||||
# Queue worker
|
||||
supervisord --nodaemon --configuration /etc/supervisord.conf
|
||||
supervisorctl start "laravel-worker:*"
|
||||
|
||||
# Start all of the server sumulataneously
|
||||
|
Reference in New Issue
Block a user