mirror of
https://github.com/elyby/accounts.git
synced 2024-11-06 16:21:08 +05:30
f33439d829
Build nginx and mariadb together with the app image. Upgrade docker-compose configuration to 3 version. Add cleanup step to the gitlab-ci.
16 lines
353 B
Bash
Executable File
16 lines
353 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
result="upstream php {"
|
|
|
|
for x in $(echo $PHP_SERVERS | tr "," "\n"); do
|
|
parts=$(echo $x | tr "x" "\n")
|
|
host=$(echo $parts | awk '{print $1}')
|
|
weight=$(echo $parts | awk '{print $2}')
|
|
|
|
result="$result\n server $host weight=${weight:-1};"
|
|
done
|
|
|
|
result="$result\n}"
|
|
|
|
echo -e $result > /etc/nginx/conf.d/upstream.conf
|