Only copy docker configs for selected apps.

This commit is contained in:
2026-01-18 08:20:56 -08:00
parent b285ad3980
commit 757e244688
2 changed files with 37 additions and 2 deletions

31
copy-apps.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# this script copys over the docker configs
# for in-use apps
# it depends on apps.config which should define:
# ROOT_DOMAIN - the root domain for all apps
# APP_CONFIGS - app-subdomain pairs, configured via a comma, like:
# app1,subdomain1 app2,subdomain2 app3,subdomain3
# full example:
# ROOT_DOMAIN=nassella.cc
# APP_CONFIGS="app1,subdomain1 app2,subdomain2 app3,subdomain3"
set -e
. $1 # source the apps.config file with then env vars
read -r -a APP_CONFIGS <<< "$APP_CONFIGS"
APP_CONFIGS+=('lb,root')
for config_string in ${APP_CONFIGS[@]}; do
IFS=','
read -r -a config <<< "$config_string"
app=${config[0]}
cp -a all-apps/$app app/
done