Support /etc/bridgehead/PROJECT.local.conf

This commit is contained in:
Martin Lablans 2022-10-11 11:06:52 +02:00
parent 67ec348f74
commit ca45a3dbe9
1 changed files with 5 additions and 1 deletions

View File

@ -44,13 +44,17 @@ esac
# Load variables from /etc/bridgehead and /srv/docker/bridgehead
set -a
source /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "/etc/bridgehead/$PROJECT.conf not found"
if [ -e /etc/bridgehead/$PROJECT.local.conf ]; then
log INFO "Applying /etc/bridgehead/$PROJECT.local.conf"
source /etc/bridgehead/$PROJECT.local.conf || fail_and_report 1 "Found /etc/bridgehead/$PROJECT.local.conf but failed to import"
fi
fetchVarsFromVaultByFile /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "Unable to fetchVarsFromVaultByFile"
[ -e ./$PROJECT/vars ] && source ./$PROJECT/vars
set +a
OVERRIDE=""
if [ -f "$PROJECT/docker-compose.override.yml" ]; then
log INFO "Apply docker-compose.override.yml"
log INFO "Applying $PROJECT/docker-compose.override.yml"
OVERRIDE+="-f ./$PROJECT/docker-compose.override.yml"
fi