Add persistent volumes, tweak database host

This commit is contained in:
3wc 2021-10-07 14:46:16 +02:00
parent 9f961e3109
commit 3738836294

View File

@ -6,19 +6,18 @@ services:
environment: environment:
# see https://ghost.org/docs/config/#configuration-options # see https://ghost.org/docs/config/#configuration-options
database__client: mysql database__client: mysql
database__connection__host: db database__connection__host: ${STACK_NAME}_db
database__connection__user: root database__connection__user: root
database__connection__password: ghost database__connection__password: ghost
database__connection__database: ghost database__connection__database: ghost
# this url value is just an example, and is likely wrong for your environment!
url: https://$DOMAIN url: https://$DOMAIN
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired) # contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development #NODE_ENV: development
volumes:
- "ghost_content:/var/lib/ghost/content"
networks: networks:
- proxy - proxy
- backend - backend
volumes:
- "ghost_content:/var/lib/ghost/content/"
deploy: deploy:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
@ -45,6 +44,8 @@ services:
- backend - backend
environment: environment:
MYSQL_ROOT_PASSWORD: ghost MYSQL_ROOT_PASSWORD: ghost
volumes:
- "mysql:/var/lib/mysql"
networks: networks:
proxy: proxy:
@ -52,4 +53,5 @@ networks:
backend: backend:
volumes: volumes:
mysql:
ghost_content: ghost_content: