Properly gather, save, and generate Ghost config.
parent
c23eef3403
commit
103beca17d
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. $1 # source the apps.config file with then env vars
|
||||
|
||||
read -r -a APP_CONFIGS <<< "$APP_CONFIGS"
|
||||
|
||||
nextcloud_subdomain=
|
||||
|
||||
for config_string in ${APP_CONFIGS[@]}; do
|
||||
IFS=','
|
||||
read -r -a config <<< "$config_string"
|
||||
|
||||
app=${config[0]}
|
||||
subdomain=${config[1]}
|
||||
|
||||
if [ "$app" = "ghost" ]; then
|
||||
ghost_subdomain="$subdomain"
|
||||
fi
|
||||
done
|
||||
|
||||
# write compose env file
|
||||
echo "GHOST_DOMAIN=\"$ghost_subdomain.$ROOT_DOMAIN\"" > all-apps/ghost/.compose-env
|
||||
echo "GHOST_DATABASE_ROOT_PASSWORD=\"$GHOST_DATABASE_ROOT_PASSWORD\"" >> all-apps/ghost/.compose-env
|
||||
echo "GHOST_DATABASE_PASSWORD=\"$GHOST_DATABASE_PASSWORD\"" >> all-apps/ghost/.compose-env
|
||||
echo "mail__options__host=\"$SMTP_HOST\"" >> all-apps/ghost/.compose-env
|
||||
echo "mail__options__port=\"$SMTP_PORT\"" >> all-apps/ghost/.compose-env
|
||||
echo "mail__options__auth__user=\"$SMTP_AUTH_USER\"" >> all-apps/ghost/.compose-env
|
||||
echo "mail__options__auth__pass=\"$SMTP_AUTH_PASSWORD\"" >> all-apps/ghost/.compose-env
|
||||
echo "mail__from=\"$SMTP_FROM\"" >> all-apps/ghost/.compose-env
|
||||
cat all-apps/ghost/.compose.env.tmpl >> all-apps/ghost/.compose-env
|
||||
Loading…
Reference in New Issue