Skip to content

Commit 288ccf9

Browse files
author
rok
committed
supporting multiple truethy values for LARAVEL_HORIZON environment variable
1 parent 219b2e8 commit 288ccf9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

init.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-512}
1616
sed -e "s~%%MEMORY_LIMIT%%~${PHP_MEMORY_LIMIT}m~" \
1717
/opt/etc/custom-php.ini.tpl > /usr/local/etc/php/conf.d/custom-php.ini
1818

19-
if [ "$LARAVEL_HORIZON" = false ]; then
19+
if [ "$LARAVEL_HORIZON" = "true" ] || [ "$LARAVEL_HORIZON" = "1" ] ; then
20+
cp /etc/supervisor/conf.d/laravel-horizon.conf.tpl /etc/supervisor/supervisord.conf
21+
else
2022
sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
2123
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
2224
-e "s~%%MEMORY_LIMIT%%~$PHP_MEMORY_LIMIT~" \
2325
/etc/supervisor/conf.d/laravel-worker.conf.tpl > /etc/supervisor/supervisord.conf
2426
fi
2527

26-
if [ "$LARAVEL_HORIZON" = true ]; then
27-
cp /etc/supervisor/conf.d/laravel-horizon.conf.tpl /etc/supervisor/supervisord.conf
28-
fi
29-
3028
exec supervisord --nodaemon --configuration /etc/supervisor/supervisord.conf

0 commit comments

Comments
 (0)