2024-05-30 17:34:23 +02:00
|
|
|
# Overwrite files with secrets from `.env`
|
|
|
|
echo "[server_config] > Writting secrets to source files"
|
|
|
|
source ./load_secrets.sh
|
|
|
|
|
2024-07-17 16:18:12 +02:00
|
|
|
# Make sure default owner of config files is root
|
|
|
|
chown -R root:root .
|
|
|
|
|
2024-05-30 17:34:23 +02:00
|
|
|
# Deploy services
|
2024-05-29 13:42:18 +02:00
|
|
|
APPS=$@
|
|
|
|
|
2024-05-30 12:33:42 +02:00
|
|
|
if [[ $# -eq 1 ]]; then
|
2024-05-30 12:43:10 +02:00
|
|
|
if [[ $1 == "--all" || $1 == "-a" ]]; then
|
2024-05-30 12:33:42 +02:00
|
|
|
APPS=$(ls -d */)
|
|
|
|
fi
|
|
|
|
fi
|
2024-05-29 13:42:18 +02:00
|
|
|
|
2024-06-05 18:10:40 +02:00
|
|
|
BASE=$(pwd)
|
|
|
|
|
2024-05-30 12:29:24 +02:00
|
|
|
for app in $APPS
|
2024-05-29 13:42:18 +02:00
|
|
|
do
|
2024-06-05 18:10:40 +02:00
|
|
|
cd $BASE
|
2024-05-29 13:42:18 +02:00
|
|
|
echo "[server_config] > Deploying: $app"
|
|
|
|
|
|
|
|
source "./$app/_deploy.sh" \
|
|
|
|
&& echo "[server_config] > Deploy done" \
|
|
|
|
|| echo "[server_config] > Deploy failed"
|
|
|
|
done
|