#!/bin/bash # Copyright 2025-2026 Thomas Hintz # This file is part of Nassella. # Nassella is free software: you can redistribute it and/or modify it under the # terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # Nassella is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with Nassella. If not, see . # 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-version pairs, configured via a comma, like: # app1,subdomain1,version app2,subdomain2,version app3,subdomain3,version # full example: # ROOT_DOMAIN=nassella.cc # APP_CONFIGS="app1,subdomain1,1 app2,subdomain2,1 app3,subdomain3,1" set -e . $1 # source the apps.config file with the env vars read -r -a APP_CONFIGS <<< "$APP_CONFIGS" # APP_CONFIGS+=('lb,root,1') # TODO is this used anymore? for config_string in ${APP_CONFIGS[@]}; do IFS=',' read -r -a config <<< "$config_string" app=${config[0]} version=${config[2]} cp -a all-apps/$app/$version app/$app done