From bb115cbcc95c6cff8d060fe494272a91f9ae0bc8 Mon Sep 17 00:00:00 2001 From: Mortexa <47121888+smortexa@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:24:40 +0330 Subject: [PATCH] Fix Supervisor configuration (#123) --- .env.production | 6 +- FrankenPHP.Alpine.Dockerfile | 6 +- FrankenPHP.Dockerfile | 6 +- RoadRunner.Alpine.Dockerfile | 2 +- RoadRunner.Dockerfile | 2 +- Swoole.Alpine.Dockerfile | 2 +- Swoole.Dockerfile | 2 +- .../FrankenPHP/supervisord.frankenphp.conf | 102 +++++++++--------- .../RoadRunner/supervisord.roadrunner.conf | 102 +++++++++--------- .../octane/Swoole/supervisord.swoole.conf | 102 +++++++++--------- deployment/supervisord.conf | 14 +-- deployment/supervisord.horizon.conf | 22 ++-- deployment/supervisord.reverb.conf | 22 ++-- deployment/supervisord.scheduler.conf | 42 ++++---- deployment/supervisord.worker.conf | 20 ++-- docker-compose.production.yml | 12 +-- static-build.Dockerfile | 6 +- 17 files changed, 236 insertions(+), 234 deletions(-) diff --git a/.env.production b/.env.production index 3bc798d..cceffc6 100644 --- a/.env.production +++ b/.env.production @@ -3,8 +3,8 @@ VITE_APP_NAME="${APP_NAME}" APP_ENV=production APP_KEY=base64:pKFQK9r60jaB/4CB5UOz1sIabob9yF1qt9rIrsS/UUw= APP_DEBUG=false -APP_DOMAIN=localhost -APP_URL=https://${APP_DOMAIN} +APP_HOST=localhost +APP_URL=https://${APP_HOST} APP_TIMEZONE=UTC ASSET_URL="/" # for relative asset path @@ -76,7 +76,7 @@ TYPESENSE_API_KEY="123456" REVERB_APP_ID=123456 REVERB_APP_KEY=user REVERB_APP_SECRET=123456 -REVERB_HOST=${APP_DOMAIN} +REVERB_HOST=${APP_HOST} REVERB_PORT=8080 REVERB_SCHEME=http diff --git a/FrankenPHP.Alpine.Dockerfile b/FrankenPHP.Alpine.Dockerfile index 3a9d96c..a4d82d0 100644 --- a/FrankenPHP.Alpine.Dockerfile +++ b/FrankenPHP.Alpine.Dockerfile @@ -3,7 +3,6 @@ ARG FRANKENPHP_VERSION=1.4 ARG COMPOSER_VERSION=2.8 ARG BUN_VERSION="latest" ARG APP_ENV -ARG APP_DOMAIN FROM composer:${COMPOSER_VERSION} AS vendor @@ -37,6 +36,7 @@ ARG WWWGROUP=1000 ARG TZ=UTC ARG APP_DIR=/var/www/html ARG APP_ENV +ARG APP_HOST ENV TERM=xterm-color \ OCTANE_SERVER=frankenphp \ @@ -48,7 +48,7 @@ ENV TERM=xterm-color \ COMPOSER_MAX_PARALLEL_HTTP=24 \ XDG_CONFIG_HOME=${APP_DIR}/.config \ XDG_DATA_HOME=${APP_DIR}/.data \ - SERVER_NAME=${APP_DOMAIN} + SERVER_NAME=${APP_HOST} WORKDIR ${ROOT} @@ -123,7 +123,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/start-container /usr/local/bin/start-container diff --git a/FrankenPHP.Dockerfile b/FrankenPHP.Dockerfile index 8510280..31f323e 100644 --- a/FrankenPHP.Dockerfile +++ b/FrankenPHP.Dockerfile @@ -36,7 +36,7 @@ ARG WWWGROUP=1000 ARG TZ=UTC ARG APP_DIR=/var/www/html ARG APP_ENV -ARG APP_DOMAIN +ARG APP_HOST ENV DEBIAN_FRONTEND=noninteractive \ TERM=xterm-color \ @@ -49,7 +49,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ COMPOSER_MAX_PARALLEL_HTTP=24 \ XDG_CONFIG_HOME=${APP_DIR}/.config \ XDG_DATA_HOME=${APP_DIR}/.data \ - SERVER_NAME=${APP_DOMAIN} + SERVER_NAME=${APP_HOST} WORKDIR ${ROOT} @@ -128,7 +128,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/start-container /usr/local/bin/start-container diff --git a/RoadRunner.Alpine.Dockerfile b/RoadRunner.Alpine.Dockerfile index ee0df0b..19f8f05 100644 --- a/RoadRunner.Alpine.Dockerfile +++ b/RoadRunner.Alpine.Dockerfile @@ -103,7 +103,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/RoadRunner/supervisord.roadrunner.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini diff --git a/RoadRunner.Dockerfile b/RoadRunner.Dockerfile index e6726a1..03fa677 100644 --- a/RoadRunner.Dockerfile +++ b/RoadRunner.Dockerfile @@ -106,7 +106,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/RoadRunner/supervisord.roadrunner.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini diff --git a/Swoole.Alpine.Dockerfile b/Swoole.Alpine.Dockerfile index add35be..cce86d4 100644 --- a/Swoole.Alpine.Dockerfile +++ b/Swoole.Alpine.Dockerfile @@ -104,7 +104,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/Swoole/supervisord.swoole.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini diff --git a/Swoole.Dockerfile b/Swoole.Dockerfile index 3b29f82..7593c2f 100644 --- a/Swoole.Dockerfile +++ b/Swoole.Dockerfile @@ -107,7 +107,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/Swoole/supervisord.swoole.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini diff --git a/deployment/octane/FrankenPHP/supervisord.frankenphp.conf b/deployment/octane/FrankenPHP/supervisord.frankenphp.conf index be46fd7..564ff90 100644 --- a/deployment/octane/FrankenPHP/supervisord.frankenphp.conf +++ b/deployment/octane/FrankenPHP/supervisord.frankenphp.conf @@ -1,62 +1,62 @@ [program:octane] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan octane:frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019 --caddyfile=%(ENV_ROOT)s/deployment/octane/FrankenPHP/Caddyfile -user=%(ENV_USER)s -autostart=true -autorestart=true -environment=LARAVEL_OCTANE="1" -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan octane:frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019 --caddyfile=%(ENV_ROOT)s/deployment/octane/FrankenPHP/Caddyfile +user = %(ENV_USER)s +autostart = true +autorestart = true +environment = LARAVEL_OCTANE = "1" +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [program:horizon] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan horizon -user=%(ENV_USER)s -autostart=%(ENV_WITH_HORIZON)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/horizon.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/horizon.log -stderr_logfile_maxbytes=200MB -stopwaitsecs=3600 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan horizon +user = %(ENV_USER)s +autostart = %(ENV_WITH_HORIZON)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/horizon.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/horizon.log +stderr_logfile_maxbytes = 200MB +stopwaitsecs = 3600 [program:scheduler] -process_name=%(program_name)s_%(process_num)s -command=supercronic -overlapping /etc/supercronic/laravel -user=%(ENV_USER)s -autostart=%(ENV_WITH_SCHEDULER)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stderr_logfile_maxbytes=200MB +process_name = %(program_name)s_%(process_num)s +command = supercronic -overlapping /etc/supercronic/laravel +user = %(ENV_USER)s +autostart = %(ENV_WITH_SCHEDULER)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stderr_logfile_maxbytes = 200MB [program:clear-scheduler-cache] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan schedule:clear-cache -user=%(ENV_USER)s -autostart=%(ENV_WITH_SCHEDULER)s -autorestart=false -startsecs=0 -startretries=1 -stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stderr_logfile_maxbytes=200MB +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan schedule:clear-cache +user = %(ENV_USER)s +autostart = %(ENV_WITH_SCHEDULER)s +autorestart = false +startsecs = 0 +startretries = 1 +stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stderr_logfile_maxbytes = 200MB [program:reverb] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan reverb:start -user=%(ENV_USER)s -autostart=%(ENV_WITH_REVERB)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/reverb.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/reverb.log -stderr_logfile_maxbytes=200MB -minfds=10000 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan reverb:start +user = %(ENV_USER)s +autostart = %(ENV_WITH_REVERB)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/reverb.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/reverb.log +stderr_logfile_maxbytes = 200MB +minfds = 10000 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/deployment/octane/RoadRunner/supervisord.roadrunner.conf b/deployment/octane/RoadRunner/supervisord.roadrunner.conf index ee48f17..c0d6f38 100644 --- a/deployment/octane/RoadRunner/supervisord.roadrunner.conf +++ b/deployment/octane/RoadRunner/supervisord.roadrunner.conf @@ -1,62 +1,62 @@ [program:octane] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan octane:roadrunner --host=0.0.0.0 --port=8000 --rpc-port=6001 --rr-config=%(ENV_ROOT)s/.rr.yaml -user=%(ENV_USER)s -autostart=true -autorestart=true -environment=LARAVEL_OCTANE="1" -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan octane:roadrunner --host=0.0.0.0 --port=8000 --rpc-port=6001 --rr-config=%(ENV_ROOT)s/.rr.yaml +user = %(ENV_USER)s +autostart = true +autorestart = true +environment = LARAVEL_OCTANE = "1" +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [program:horizon] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan horizon -user=%(ENV_USER)s -autostart=%(ENV_WITH_HORIZON)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/horizon.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/horizon.log -stderr_logfile_maxbytes=200MB -stopwaitsecs=3600 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan horizon +user = %(ENV_USER)s +autostart = %(ENV_WITH_HORIZON)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/horizon.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/horizon.log +stderr_logfile_maxbytes = 200MB +stopwaitsecs = 3600 [program:scheduler] -process_name=%(program_name)s_%(process_num)s -command=supercronic -overlapping /etc/supercronic/laravel -user=%(ENV_USER)s -autostart=%(ENV_WITH_SCHEDULER)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stderr_logfile_maxbytes=200MB +process_name = %(program_name)s_%(process_num)s +command = supercronic -overlapping /etc/supercronic/laravel +user = %(ENV_USER)s +autostart = %(ENV_WITH_SCHEDULER)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stderr_logfile_maxbytes = 200MB [program:clear-scheduler-cache] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan schedule:clear-cache -user=%(ENV_USER)s -autostart=%(ENV_WITH_SCHEDULER)s -autorestart=false -startsecs=0 -startretries=1 -stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stderr_logfile_maxbytes=200MB +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan schedule:clear-cache +user = %(ENV_USER)s +autostart = %(ENV_WITH_SCHEDULER)s +autorestart = false +startsecs = 0 +startretries = 1 +stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stderr_logfile_maxbytes = 200MB [program:reverb] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan reverb:start -user=%(ENV_USER)s -autostart=%(ENV_WITH_REVERB)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/reverb.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/reverb.log -stderr_logfile_maxbytes=200MB -minfds=10000 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan reverb:start +user = %(ENV_USER)s +autostart = %(ENV_WITH_REVERB)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/reverb.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/reverb.log +stderr_logfile_maxbytes = 200MB +minfds = 10000 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/deployment/octane/Swoole/supervisord.swoole.conf b/deployment/octane/Swoole/supervisord.swoole.conf index 476d6b5..1494dd1 100644 --- a/deployment/octane/Swoole/supervisord.swoole.conf +++ b/deployment/octane/Swoole/supervisord.swoole.conf @@ -1,62 +1,62 @@ [program:octane] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan octane:swoole --host=0.0.0.0 --port=8000 -user=%(ENV_USER)s -autostart=true -autorestart=true -environment=LARAVEL_OCTANE="1" -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan octane:swoole --host=0.0.0.0 --port=8000 +user = %(ENV_USER)s +autostart = true +autorestart = true +environment = LARAVEL_OCTANE = "1" +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [program:horizon] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan horizon -user=%(ENV_USER)s -autostart=%(ENV_WITH_HORIZON)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/horizon.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/horizon.log -stderr_logfile_maxbytes=200MB -stopwaitsecs=3600 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan horizon +user = %(ENV_USER)s +autostart = %(ENV_WITH_HORIZON)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/horizon.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/horizon.log +stderr_logfile_maxbytes = 200MB +stopwaitsecs = 3600 [program:scheduler] -process_name=%(program_name)s_%(process_num)s -command=supercronic -overlapping /etc/supercronic/laravel -user=%(ENV_USER)s -autostart=%(ENV_WITH_SCHEDULER)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stderr_logfile_maxbytes=200MB +process_name = %(program_name)s_%(process_num)s +command = supercronic -overlapping /etc/supercronic/laravel +user = %(ENV_USER)s +autostart = %(ENV_WITH_SCHEDULER)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stderr_logfile_maxbytes = 200MB [program:clear-scheduler-cache] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan schedule:clear-cache -user=%(ENV_USER)s -autostart=%(ENV_WITH_SCHEDULER)s -autorestart=false -startsecs=0 -startretries=1 -stdout_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/scheduler.log -stderr_logfile_maxbytes=200MB +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan schedule:clear-cache +user = %(ENV_USER)s +autostart = %(ENV_WITH_SCHEDULER)s +autorestart = false +startsecs = 0 +startretries = 1 +stdout_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/scheduler.log +stderr_logfile_maxbytes = 200MB [program:reverb] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan reverb:start -user=%(ENV_USER)s -autostart=%(ENV_WITH_REVERB)s -autorestart=true -stdout_logfile=%(ENV_ROOT)s/storage/logs/reverb.log -stdout_logfile_maxbytes=200MB -stderr_logfile=%(ENV_ROOT)s/storage/logs/reverb.log -stderr_logfile_maxbytes=200MB -minfds=10000 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan reverb:start +user = %(ENV_USER)s +autostart = %(ENV_WITH_REVERB)s +autorestart = true +stdout_logfile = %(ENV_ROOT)s/storage/logs/reverb.log +stdout_logfile_maxbytes = 200MB +stderr_logfile = %(ENV_ROOT)s/storage/logs/reverb.log +stderr_logfile_maxbytes = 200MB +minfds = 10000 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/deployment/supervisord.conf b/deployment/supervisord.conf index db02493..18edfef 100644 --- a/deployment/supervisord.conf +++ b/deployment/supervisord.conf @@ -1,11 +1,13 @@ [supervisord] -nodaemon=true -user=%(ENV_USER)s -logfile=/var/log/supervisor/supervisord.log -pidfile=/var/run/supervisord.pid +nodaemon = true +user = %(ENV_USER)s +logfile = /var/log/supervisor/supervisord.log +pidfile = /var/run/supervisord.pid [supervisorctl] -serverurl=unix:///var/run/supervisor.sock + +[inet_http_server] +port = 127.0.0.1:9001 [rpcinterface:supervisor] -supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface \ No newline at end of file diff --git a/deployment/supervisord.horizon.conf b/deployment/supervisord.horizon.conf index 1cb499e..2355c58 100644 --- a/deployment/supervisord.horizon.conf +++ b/deployment/supervisord.horizon.conf @@ -1,14 +1,14 @@ [program:horizon] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan horizon -user=%(ENV_USER)s -autostart=true -autorestart=true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -stopwaitsecs=3600 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan horizon +user = %(ENV_USER)s +autostart = true +autorestart = true +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 +stopwaitsecs = 3600 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/deployment/supervisord.reverb.conf b/deployment/supervisord.reverb.conf index 2dfc663..058b1ab 100644 --- a/deployment/supervisord.reverb.conf +++ b/deployment/supervisord.reverb.conf @@ -1,14 +1,14 @@ [program:reverb] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan reverb:start -user=%(ENV_USER)s -autostart=true -autorestart=true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -minfds=10000 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan reverb:start +user = %(ENV_USER)s +autostart = true +autorestart = true +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 +minfds = 10000 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/deployment/supervisord.scheduler.conf b/deployment/supervisord.scheduler.conf index b5e306f..f70d559 100644 --- a/deployment/supervisord.scheduler.conf +++ b/deployment/supervisord.scheduler.conf @@ -1,26 +1,26 @@ [program:scheduler] -process_name=%(program_name)s_%(process_num)s -command=supercronic -overlapping /etc/supercronic/laravel -user=%(ENV_USER)s -autostart=true -autorestart=true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +process_name = %(program_name)s_%(process_num)s +command = supercronic -overlapping /etc/supercronic/laravel +user = %(ENV_USER)s +autostart = true +autorestart = true +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [program:clear-scheduler-cache] -process_name=%(program_name)s_%(process_num)s -command=php %(ENV_ROOT)s/artisan schedule:clear-cache -user=%(ENV_USER)s -autostart=true -autorestart=false -startsecs=0 -startretries=1 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +process_name = %(program_name)s_%(process_num)s +command = php %(ENV_ROOT)s/artisan schedule:clear-cache +user = %(ENV_USER)s +autostart = true +autorestart = false +startsecs = 0 +startretries = 1 +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/deployment/supervisord.worker.conf b/deployment/supervisord.worker.conf index 5286aeb..5e839ab 100644 --- a/deployment/supervisord.worker.conf +++ b/deployment/supervisord.worker.conf @@ -1,13 +1,13 @@ [program:worker] -process_name=%(program_name)s_%(process_num)s -command=%(ENV_WORKER_COMMAND)s -user=%(ENV_USER)s -autostart=true -autorestart=true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 +process_name = %(program_name)s_%(process_num)s +command = %(ENV_WORKER_COMMAND)s +user = %(ENV_USER)s +autostart = true +autorestart = true +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [include] -files=/etc/supervisor/supervisord.conf \ No newline at end of file +files = /etc/supervisord.conf \ No newline at end of file diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 098a06d..b25f0d2 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -18,7 +18,7 @@ x-base: &base dockerfile: FrankenPHP.Dockerfile args: APP_ENV: 'production' # to load .env.production - APP_DOMAIN: '${APP_DOMAIN}' + APP_HOST: '${APP_HOST}' WWWUSER: ${HOST_UID:-1000} WWWGROUP: ${HOST_GID:-1000} image: laravel/app @@ -89,7 +89,7 @@ services: logging: *default-logging labels: traefik.enable: true - traefik.http.routers.traefik.rule: Host(`localhost`) || Host(`${APP_DOMAIN}`) + traefik.http.routers.traefik.rule: Host(`localhost`) || Host(`${APP_HOST}`) traefik.http.routers.traefik.service: api@internal traefik.http.routers.traefik.entryPoints: traefik traefik.http.routers.traefik.middlewares: "traefik-auth,traefik-retry" @@ -108,12 +108,12 @@ services: labels: traefik.enable: true - traefik.http.routers.app.rule: Host(`${APP_DOMAIN}`) || Host(`localhost`) + traefik.http.routers.app.rule: Host(`${APP_HOST}`) || Host(`localhost`) traefik.http.routers.app.entryPoints: app traefik.http.routers.app.service: app-service traefik.http.routers.app.middlewares: "redirect-scheme,app-retry,app-compress,security-headers" - traefik.http.routers.app-secure.rule: Host(`${APP_DOMAIN}`) || Host(`localhost`) + traefik.http.routers.app-secure.rule: Host(`${APP_HOST}`) || Host(`localhost`) traefik.http.routers.app-secure.entryPoints: app-secure traefik.http.routers.app-secure.service: app-service traefik.http.routers.app-secure.tls: true @@ -162,7 +162,7 @@ services: CONTAINER_MODE: reverb labels: traefik.enable: true - traefik.http.routers.reverb.rule: Host(`${APP_DOMAIN}`) || Host(`localhost`) + traefik.http.routers.reverb.rule: Host(`${APP_HOST}`) || Host(`localhost`) traefik.http.routers.reverb.entryPoints: reverb traefik.http.routers.reverb.tls: true traefik.http.routers.reverb.middlewares: "reverb-retry" @@ -346,7 +346,7 @@ services: traefik.http.routers.minio-console.middlewares: "minio-auth,minio-retry" traefik.http.services.minio-console-service.loadbalancer.server.port: 8900 - traefik.http.routers.minio.rule: Host(`${APP_DOMAIN}`) || Host(`localhost`) + traefik.http.routers.minio.rule: Host(`${APP_HOST}`) || Host(`localhost`) traefik.http.routers.minio.entryPoints: minio traefik.http.routers.minio.service: minio-service traefik.http.routers.minio.middlewares: "minio-retry,minio-compress" diff --git a/static-build.Dockerfile b/static-build.Dockerfile index 0e1ee2d..4f94386 100644 --- a/static-build.Dockerfile +++ b/static-build.Dockerfile @@ -36,7 +36,7 @@ ARG WWWGROUP=1000 ARG TZ=UTC ARG APP_DIR=/var/www/html ARG APP_ENV -ARG APP_DOMAIN +ARG APP_HOST ENV DEBIAN_FRONTEND=noninteractive \ TERM=xterm-color \ @@ -49,7 +49,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ COMPOSER_MAX_PARALLEL_HTTP=24 \ XDG_CONFIG_HOME=${APP_DIR}/.config \ XDG_DATA_HOME=${APP_DIR}/.data \ - SERVER_NAME=${APP_DOMAIN} + SERVER_NAME=${APP_HOST} WORKDIR ${ROOT} @@ -128,7 +128,7 @@ USER ${USER} COPY --link --chown=${WWWUSER}:${WWWUSER} --from=vendor /usr/bin/composer /usr/bin/composer -COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/supervisor/ +COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.conf /etc/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/supervisord.*.conf /etc/supervisor/conf.d/ COPY --link --chown=${WWWUSER}:${WWWUSER} deployment/start-container /usr/local/bin/start-container