fix preinstall

This commit is contained in:
Simon Larsen 2022-11-08 17:40:45 +00:00
parent 66adffbd21
commit d9d0e17a86
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
2 changed files with 10 additions and 7 deletions

View File

@ -71,4 +71,6 @@ INTERNAL_SMTP_PASSWORD=oneuptime
# Licensing Database
AIRTABLE_API_KEY=
AIRTABLE_BASE_ID=
TOKEN_SECRET={{ .Env.ENCRYPTION_SECRET }}
TOKEN_SECRET={{ .Env.ENCRYPTION_SECRET }}
# Ingress Certificate

View File

@ -116,15 +116,16 @@ export $(grep -v '^#' config.env | xargs)
# Write env vars in config files.
for d in */ ; do
if [ -f ./$d.env.tpl ]; then
cat ./$d.env.tpl | gomplate > ./$d.env
for directory_name in $(find . -type d -maxdepth 1) ; do
if [ -f "$directory_name/.env.tpl" ]; then
cat $directory_name/.env.tpl | gomplate > $directory_name/.env
fi
if [ -f ./$d.Dockerfile.tpl ]; then
cat ./$d.Dockerfile.tpl | gomplate > ./$d.Dockerfile
if [ -f "$directory_name/Dockerfile.tpl" ]; then
cat $directory_name/Dockerfile.tpl | gomplate > $directory_name/Dockerfile
fi
done
# Write this to docker-compose.
# Convert template to docker-compose.
cat docker-compose.tpl.yml | gomplate > docker-compose.yml