25 lines
467 B
Bash
25 lines
467 B
Bash
# 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)
|
|
|
|
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
|