Hopefully fix supervisor issue
This commit is contained in:
parent
3d7683c8ac
commit
f18aa877a7
@ -14,7 +14,7 @@ PHP_CLI_SERVER_WORKERS=4
|
|||||||
|
|
||||||
BCRYPT_ROUNDS=12
|
BCRYPT_ROUNDS=12
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stderr
|
||||||
LOG_STACK=single
|
LOG_STACK=single
|
||||||
LOG_DEPRECATIONS_CHANNEL=null
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
|
@ -13,7 +13,8 @@ RUN install-php-extensions \
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
supervisor \
|
supervisor \
|
||||||
cron \
|
cron \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& mkdir -p /var/log/supervisor
|
||||||
|
|
||||||
# Set up supervisor configuration
|
# Set up supervisor configuration
|
||||||
COPY ./supervisor/ /etc/supervisor/conf.d/
|
COPY ./supervisor/ /etc/supervisor/conf.d/
|
||||||
|
@ -21,23 +21,23 @@ if [ -f "/app/hook.sh" ]; then
|
|||||||
/app/hook.sh
|
/app/hook.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start supervisor services if enabled
|
|
||||||
if [ "$ENABLE_QUEUE_WORKER" = "true" ]; then
|
|
||||||
echo "Enabling Laravel queue worker..."
|
|
||||||
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf update laravel-queue
|
|
||||||
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start laravel-queue:*
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ENABLE_SCHEDULER" = "true" ]; then
|
|
||||||
echo "Enabling Laravel scheduler..."
|
|
||||||
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf update laravel-scheduler
|
|
||||||
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start laravel-scheduler:*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start supervisor if any services are enabled
|
# Start supervisor if any services are enabled
|
||||||
if [ "$ENABLE_QUEUE_WORKER" = "true" ] || [ "$ENABLE_SCHEDULER" = "true" ]; then
|
if [ "$ENABLE_QUEUE_WORKER" = "true" ] || [ "$ENABLE_SCHEDULER" = "true" ]; then
|
||||||
echo "Starting supervisor..."
|
echo "Starting supervisor..."
|
||||||
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &
|
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &
|
||||||
|
|
||||||
|
# Wait for supervisor to start
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
if [ "$ENABLE_QUEUE_WORKER" = "true" ]; then
|
||||||
|
echo "Starting Laravel queue worker..."
|
||||||
|
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start laravel-queue:*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ENABLE_SCHEDULER" = "true" ]; then
|
||||||
|
echo "Starting Laravel scheduler..."
|
||||||
|
supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start laravel-scheduler:*
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# exec php /app/artisan octane:frankenphp
|
# exec php /app/artisan octane:frankenphp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user