add Supervisord
This commit is contained in:
parent
23eade381d
commit
5c071edfbf
@ -66,6 +66,7 @@ WORKDIR /app
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libpng-dev libjpeg-dev libfreetype6-dev \
|
libpng-dev libjpeg-dev libfreetype6-dev \
|
||||||
libzip-dev libicu-dev pkg-config \
|
libzip-dev libicu-dev pkg-config \
|
||||||
|
supervisor \
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install gd pdo pdo_mysql zip bcmath intl exif \
|
&& docker-php-ext-install gd pdo pdo_mysql zip bcmath intl exif \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
@ -76,6 +77,7 @@ COPY . .
|
|||||||
# Vendor & assets
|
# Vendor & assets
|
||||||
COPY --from=composer /app/vendor vendor
|
COPY --from=composer /app/vendor vendor
|
||||||
COPY --from=frontend /app/public/build public/build
|
COPY --from=frontend /app/public/build public/build
|
||||||
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
RUN chown -R www-data:www-data storage bootstrap/cache \
|
RUN chown -R www-data:www-data storage bootstrap/cache \
|
||||||
&& chmod -R 775 storage bootstrap/cache
|
&& chmod -R 775 storage bootstrap/cache
|
||||||
|
|||||||
@ -1,9 +1,15 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: purwakarta-diskominfo-simedkom-new:v1.0.0
|
image: purwakarta-diskominfo-simedkom-new:v1.0.0
|
||||||
|
container_name: purwakarta-diskominfo-simedkom-new
|
||||||
# command: >
|
# command: >
|
||||||
# sh -c "echo 'max_execution_time=300' > /usr/local/etc/php/conf.d/custom.ini && php artisan storage:link && pap artisan optimize:clear && php-fpm"
|
# sh -c "echo 'max_execution_time=300' > /usr/local/etc/php/conf.d/custom.ini && php artisan storage:link && pap artisan optimize:clear && php-fpm"
|
||||||
container_name: purwakarta-diskominfo-simedkom-new
|
command: >
|
||||||
|
sh -c "
|
||||||
|
php artisan storage:link || true &&
|
||||||
|
mkdir -p storage/app/public/auth-bg &&
|
||||||
|
exec supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
"
|
||||||
ports:
|
ports:
|
||||||
- "8103:80"
|
- "8103:80"
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
22
supervisord.conf
Normal file
22
supervisord.conf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
logfile=/var/log/supervisord.log
|
||||||
|
pidfile=/var/run/supervisord.pid
|
||||||
|
|
||||||
|
[program:web]
|
||||||
|
command=frankenphp run --config /etc/caddy/Caddyfile
|
||||||
|
directory=/app
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=10
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
|
||||||
|
[program:queue]
|
||||||
|
command=php artisan queue:work --sleep=3 --tries=3 --timeout=90
|
||||||
|
directory=/app
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=20
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
Loading…
Reference in New Issue
Block a user