Finishing make app refactor.
This commit is contained in:
4
all-apps/ghost/6/Caddyfile
Normal file
4
all-apps/ghost/6/Caddyfile
Normal file
@@ -0,0 +1,4 @@
|
||||
{$ghost_SUBDOMAIN}.{$ROOT_DOMAIN} {
|
||||
import maintenance_intercept
|
||||
reverse_proxy http://ghost:2368
|
||||
}
|
||||
5
all-apps/ghost/6/Makefile
Normal file
5
all-apps/ghost/6/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
IMAGE_DEPS := $(IMAGE_DEPS) \
|
||||
app/ghost/.compose-env
|
||||
|
||||
app/ghost/.compose-env: $(apps_config) app/ghost/.compose.env.tmpl app/ghost/make-ghost-env.sh
|
||||
./app/ghost/make-ghost-env.sh $(apps_config)
|
||||
32
all-apps/ghost/6/make-ghost-env.sh
Executable file
32
all-apps/ghost/6/make-ghost-env.sh
Executable file
@@ -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"
|
||||
|
||||
ghost_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\"" > app/ghost/.compose-env
|
||||
echo "GHOST_DATABASE_ROOT_PASSWORD=\"$GHOST_DATABASE_ROOT_PASSWORD\"" >> app/ghost/.compose-env
|
||||
echo "GHOST_DATABASE_PASSWORD=\"$GHOST_DATABASE_PASSWORD\"" >> app/ghost/.compose-env
|
||||
echo "mail__options__host=\"$SMTP_HOST\"" >> app/ghost/.compose-env
|
||||
echo "mail__options__port=\"$SMTP_PORT\"" >> app/ghost/.compose-env
|
||||
echo "mail__options__auth__user=\"$SMTP_AUTH_USER\"" >> app/ghost/.compose-env
|
||||
echo "mail__options__auth__pass=\"$SMTP_AUTH_PASSWORD\"" >> app/ghost/.compose-env
|
||||
echo "mail__from=\"$SMTP_FROM\"" >> app/ghost/.compose-env
|
||||
cat app/ghost/.compose.env.tmpl >> app/ghost/.compose-env
|
||||
Reference in New Issue
Block a user