-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
34 lines (29 loc) · 866 Bytes
/
docker-entrypoint.sh
File metadata and controls
34 lines (29 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
set -e
# config file location
config_file="/etc/supervisord.conf"
# Set env controlled variables
COMMAND=${COMMAND:-php /var/www/apps/laravel/artisan queue:work --sleep=3 --tries=3 --daemon}
PROCESSES=${PROCESSES:-4}
AUTOSTART=${AUTOSTART:-true}
AUTORESTART=${AUTORESTART:-true}
# Supervisord config file contents
cat << EOF > $config_file
[supervisord]
nodaemon=true
user=root
[supervisorctl]
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=$COMMAND
autostart=$AUTOSTART
autorestart=$AUTORESTART
numprocs=$PROCESSES
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
EOF
echo "Supervisord configuration completed, starting supervisord"
/usr/bin/supervisord -n -c /etc/supervisord.conf