diff --git a/docker-compose.yml b/docker-compose.yml index 6a0d712..204d3c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,12 +16,11 @@ services: - ghost-content-data:/var/lib/ghost/content/data - ghost-content-logs:/var/lib/ghost/content/logs environment: + - NODE_ENV=production - DOMAIN=$DOMAIN - SCHEME=$SCHEME - - MAIL-SERVICE=$MAIL-SERVICE - - MAIL-USER=$MAIL-USER - - MAIL-PASSWORD=$MAIL-PASSWORD - COMMENTO_ORIGIN=$COMMENTO_ORIGIN + - MAIL=$MAIL - database__client=mysql - database__connection__host=ghost-mysql - database__connection__user=root diff --git a/ghost/Dockerfile b/ghost/Dockerfile index 852bdef..0aaeee7 100644 --- a/ghost/Dockerfile +++ b/ghost/Dockerfile @@ -10,7 +10,7 @@ FROM ${REGISTRY}ghost:3.14.0 RUN apt-get update RUN apt-get install -y gettext -COPY config.production.json /var/lib/ghost/ +COPY config.production.json.template /var/lib/ghost/ COPY --from=git /themes/ /var/lib/ghost/content/themes/ COPY post.hbs /hbs/ COPY run.sh / diff --git a/ghost/config.production.json.template b/ghost/config.production.json.template new file mode 100644 index 0000000..a2d3f94 --- /dev/null +++ b/ghost/config.production.json.template @@ -0,0 +1,24 @@ +{ + "url": "${SCHEME}://${DOMAIN}/", + "server": { + "port": 2368, + "host": "0.0.0.0" + }, + "database": { + "client": "sqlite3", + "connection": { + "filename": "/var/lib/ghost/content/data/ghost.db" + } + }, + "mail": ${MAIL}, + "logging": { + "transports": [ + "file", + "stdout" + ] + }, + "process": "systemd", + "paths": { + "contentPath": "/var/lib/ghost/content" + } +} diff --git a/ghost/run.sh b/ghost/run.sh index d457f2a..ffd1168 100644 --- a/ghost/run.sh +++ b/ghost/run.sh @@ -1,3 +1,3 @@ -envsubst < /var/lib/ghost/config.production.json > __tmp && mv __tmp /var/lib/ghost/config.production.json +envsubst < /var/lib/ghost/config.production.json.template > /var/lib/ghost/config.production.json envsubst < /hbs/post.hbs > /var/lib/ghost/content/themes/casper/post.hbs node "current/index.js"