ghost/docker-compose.yml

63 lines
1.6 KiB
YAML

version: "3.7"
services:
ghost:
# ghost blog
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack == yes]
replicas: 1
restart_policy:
condition: any
image: ${LOCAL_DOCKER_REGISTRY}my-ghost
volumes:
- ghost-content-images:/var/lib/ghost/content/images
- ghost-content-settings:/var/lib/ghost/content/settings
- ghost-content-adapters:/var/lib/ghost/content/adapters
- ghost-content-data:/var/lib/ghost/content/data
- ghost-content-logs:/var/lib/ghost/content/logs
environment:
- NODE_ENV=production
- DOMAIN=$DOMAIN
- SCHEME=$SCHEME
- COMMENTO_ORIGIN=$COMMENTO_ORIGIN
- MAIL=$MAIL
- database__client=mysql
- database__connection__host=ghost-mysql
- database__connection__user=root
- database__connection__password=$MYSQL_ROOT_PASSWORD
- database__connection__database=ghost
- database__pool__min=0 # https://github.com/knex/knex/issues/975
networks:
- appnet
- externalnet
ghost-mysql:
image: ${LOCAL_DOCKER_REGISTRY}mysql:5.7
deploy:
placement:
constraints: [node.labels.com.sigyl.git-stack-data == yes]
replicas: 1
restart_policy:
condition: any
volumes:
- ghost-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
networks:
- appnet
volumes:
ghost-content:
ghost-data:
ghost-content-adapters:
ghost-content-settings:
ghost-content-images:
ghost-content-data:
ghost-content-logs:
networks:
appnet:
driver: overlay
#external: true
externalnet:
driver: overlay
external: true