Changed queue worker
Some checks failed
Push image to registry / build-image (push) Failing after 7m39s

This commit is contained in:
2025-02-20 19:22:38 +01:00
parent f1f32c44b5
commit 51eafce03a
4 changed files with 20 additions and 3 deletions

View File

@ -52,7 +52,8 @@ RUN apk update && apk add --no-cache \
supervisor \ supervisor \
nginx \ nginx \
openssl \ openssl \
linux-headers linux-headers \
supervisor
RUN docker-php-ext-configure zip && docker-php-ext-install zip RUN docker-php-ext-configure zip && docker-php-ext-install zip
RUN docker-php-ext-install gd pdo pdo_mysql zip RUN docker-php-ext-install gd pdo pdo_mysql zip
@ -75,6 +76,10 @@ RUN mv ${APP_ENV_FILE} .env
RUN composer install --no-interaction --prefer-dist 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
# CRON # CRON
RUN echo "* * * * * cd ${wd} && php artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/root RUN echo "* * * * * cd ${wd} && php artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/root

View File

@ -28,7 +28,7 @@ abstract class BrowserJob implements ShouldQueue
public int $jobId; public int $jobId;
public $timeout = 300; public $timeout = 500;
public function __construct(int $jobId) public function __construct(int $jobId)
{ {

View File

@ -0,0 +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
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=%(wd)/worker.log
stopwaitsecs=3600

View File

@ -7,7 +7,7 @@ php ./artisan migrate --force
php ./artisan optimize:clear && php ./artisan optimize php ./artisan optimize:clear && php ./artisan optimize
# Queue worker # Queue worker
php ./artisan queue:work --queue=high,default --tries=3 --timeout=300 --sleep=3 --daemon --no-interaction & supervisorctl start "laravel-worker:*"
# Start all of the server sumulataneously # Start all of the server sumulataneously
php ./artisan serve --no-interaction -vvv --port=80 --host=0.0.0.0 php ./artisan serve --no-interaction -vvv --port=80 --host=0.0.0.0