server_config/deploy.sh

25 lines
467 B
Bash
Raw Normal View History

# Overwrite files with secrets from `.env`
echo "[server_config] > Writting secrets to source files"
source ./load_secrets.sh
# Deploy services
APPS=$@
if [[ $# -eq 1 ]]; then
if [[ $1 == "--all" || $1 == "-a" ]]; then
APPS=$(ls -d */)
fi
fi
BASE=$(pwd)
2024-05-30 12:29:24 +02:00
for app in $APPS
do
cd $BASE
echo "[server_config] > Deploying: $app"
source "./$app/_deploy.sh" \
&& echo "[server_config] > Deploy done" \
|| echo "[server_config] > Deploy failed"
done