forked from eatvio/eatvio-infra
ci(queue): separate worker, fornt-end and php
This commit is contained in:
16
phpdocker/front-end/Dockerfile
Normal file
16
phpdocker/front-end/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM phpdockerio/php:8.2-fpm
|
||||
WORKDIR "/application"
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
|
||||
RUN apt-get update && \
|
||||
apt-get -y --no-install-recommends install \
|
||||
git \
|
||||
php8.2-gd \
|
||||
php8.2-mysql \
|
||||
php8.2-sqlite3 \
|
||||
php8.2-pgsql \
|
||||
nodejs && npm install -g npm@10.1.0 \
|
||||
apt-get clean; \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
|
||||
ENV PATH=node_modules/.bin:$PATH
|
||||
23
phpdocker/front-end/laravel-worker.conf
Normal file
23
phpdocker/front-end/laravel-worker.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:laravel-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /application/artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=www-data
|
||||
numprocs=2
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/application/storage/logs/worker.log
|
||||
stopwaitsecs=3600
|
||||
|
||||
[program:php-fpm]
|
||||
command=php-fpm8.2 -F
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stdderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
2
phpdocker/front-end/php-ini-overrides.ini
Normal file
2
phpdocker/front-end/php-ini-overrides.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
upload_max_filesize = 100M
|
||||
post_max_size = 108M
|
||||
@@ -9,7 +9,7 @@ autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=www-data
|
||||
numprocs=4
|
||||
numprocs=2
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/application/storage/logs/worker.log
|
||||
stopwaitsecs=3600
|
||||
|
||||
9
phpdocker/worker/Dockerfile
Normal file
9
phpdocker/worker/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM phpdockerio/php:8.2-fpm
|
||||
WORKDIR "/application"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y --no-install-recommends install git \
|
||||
php8.2-gd php8.2-mysql php8.2-sqlite3 php8.2-pgsql \
|
||||
python3-pkg-resources supervisor && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
15
phpdocker/worker/laravel-worker.conf
Normal file
15
phpdocker/worker/laravel-worker.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:laravel-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /application/artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=www-data
|
||||
numprocs=2
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/application/storage/logs/worker.log
|
||||
stopwaitsecs=3600
|
||||
2
phpdocker/worker/php-ini-overrides.ini
Normal file
2
phpdocker/worker/php-ini-overrides.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
upload_max_filesize = 100M
|
||||
post_max_size = 108M
|
||||
Reference in New Issue
Block a user