Skip to content

Commit

Permalink
Update init.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Kummer authored Nov 22, 2017
1 parent 1cf5981 commit 35f319c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ if [ -z "$QUEUE_NAME" ]; then
QUEUE_NAME="default"
fi

sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
/etc/supervisor/conf.d/laravel-worker.conf.tpl > /etc/supervisor/supervisord.conf
if [ -z "$LARAVEL_HORIZON" ]; then
LARAVEL_HORIZON=false
fi

if [ "$LARAVEL_HORIZON" = false ]; then
sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
/etc/supervisor/conf.d/laravel-worker.conf.tpl > /etc/supervisor/supervisord.conf
fi

if [ "$LARAVEL_HORIZON" = true ]; then
sed -e "s~%%QUEUE_CONNECTION%%~$QUEUE_CONNECTION~" \
-e "s~%%QUEUE_NAME%%~$QUEUE_NAME~" \
/etc/supervisor/conf.d/laravel-horizon.conf.tpl > /etc/supervisor/supervisord.conf
fi

supervisord --nodaemon --configuration /etc/supervisor/supervisord.conf

0 comments on commit 35f319c

Please sign in to comment.