Skip to content

Commit 15616b3

Browse files
author
Robert Kummer
authored
Create init.sh
1 parent fbab9ff commit 15616b3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

init.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
if [ -z "$CONNECTION" ]; then
4+
echo "Missing environment variable: CONNECTION"
5+
exit 1
6+
fi
7+
8+
if [ -Z "$QUEUE" ]; then
9+
QUEUE="default"
10+
fi
11+
12+
sed -e "s~%%CONNECTION%%~$CONNECTION~" \
13+
-e "s~%%QUEUE%%~$QUEUE~" \
14+
/etc/supervisor/conf.d/laravel-worker.conf.tpl > /etc/supervisor/supervisord.conf
15+
16+
rm /etc/supervisor/conf.d/laravel-worker.conf.tpl
17+
18+
# Debugging purpose
19+
#cat /etc/supervisor/supervisord.conf
20+
21+
supervisord --nodaemon --configuration /etc/supervisor/supervisord.conf
22+

0 commit comments

Comments
 (0)