-
Notifications
You must be signed in to change notification settings - Fork 8
/
start.sh
35 lines (26 loc) · 1016 Bytes
/
start.sh
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
35
#!/usr/bin/env bash
set -e
role=${CONTAINER_ROLE}
echo -e "
*********************************************************************************
==> Starting \"robsontenorio/laravel\" image for CONTAINER_ROLE = \"$role\" ...
APP (default) => App webserver (nginx + php-fpm).
JOBS => Queued jobs + scheduled commands (schedule:run).
ALL => APP + JOBS
*********************************************************************************
"
cd /etc/supervisor/conf.d-temp
if [ "$role" = "APP" ]; then
cp nginx.conf ../conf.d/nginx.conf
cp php-fpm.conf ../conf.d/php-fpm.conf
cp scheduler.conf ../conf.d/scheduler.conf
elif [ "$role" = "JOBS" ]; then
cp php-fpm.conf ../conf.d/php-fpm.conf
cp jobs.conf ../conf.d/jobs.conf
elif [ "$role" = "ALL" ]; then
cp nginx.conf ../conf.d/nginx.conf
cp php-fpm.conf ../conf.d/php-fpm.conf
cp jobs.conf ../conf.d/jobs.conf
cp scheduler.conf ../conf.d/scheduler.conf
fi
supervisord -c /etc/supervisord.conf