2021-08-03 16:35:27 +00:00
version : "3.8"
services :
app :
2022-07-12 09:12:50 +00:00
image : ghost:5-alpine
2021-08-03 16:35:27 +00:00
environment :
# see https://ghost.org/docs/config/#configuration-options
database__client : mysql
2021-10-07 12:46:16 +00:00
database__connection__host : ${STACK_NAME}_db
2021-08-03 16:35:27 +00:00
database__connection__user : root
database__connection__password : ghost
database__connection__database : ghost
url : https://$DOMAIN
2022-07-12 09:05:41 +00:00
mail__transport : ${MAIL_TRANSPORT}
mail__from : ${MAIL_FROM}
mail__options__host : ${MAIL_OPTIONS_HOST}
mail__options__port : ${MAIL_OPTIONS_PORT}
mail__options__secure : ${MAIL_OPTIONS_SECURE}
#mail__options__auth__user: ${MAIL_OPTIONS_AUTH_USER}
#mail__options__auth__pass: ${MAIL_OPTIONS_AUTH_PASS}
2021-08-03 16:35:27 +00:00
# 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
networks :
- proxy
- backend
2021-10-07 12:46:16 +00:00
volumes :
- "ghost_content:/var/lib/ghost/content/"
2021-08-03 16:35:27 +00:00
deploy :
restart_policy :
condition : on -failure
labels :
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=2368"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
# Redirect from EXTRA_DOMAINS to DOMAIN
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
2021-10-25 11:37:15 +00:00
- "backupbot.backup=true"
- "backupbot.backup.path=/var/lib/ghost/content"
2022-07-12 09:12:50 +00:00
- "coop-cloud.${STACK_NAME}.version=0.1.0+5.2.4"
2021-08-03 16:35:27 +00:00
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
db :
image : mysql:5.7
networks :
- backend
environment :
MYSQL_ROOT_PASSWORD : ghost
2021-10-07 12:46:16 +00:00
volumes :
- "mysql:/var/lib/mysql"
2021-10-25 11:37:15 +00:00
deploy :
labels :
- "backupbot.backup=true"
- "backupbot.backup.pre-hook=mysqldump -u root -pghost ghost --tab /var/lib/mysql-files/"
- "backupbot.backup.post-hook=rm -rf /var/lib/mysql-files/*"
- "backupbot.backup.path=/var/lib/mysql-files/"
2021-08-03 16:35:27 +00:00
networks :
proxy :
external : true
backend :
2021-08-09 20:34:29 +00:00
volumes :
2021-10-07 12:46:16 +00:00
mysql :
2021-08-09 20:34:29 +00:00
ghost_content :