blog/docker-compose.yml
2024-04-09 17:36:28 -04:00

33 lines
867 B
YAML

version: "3"
services:
ghost:
image: ghost:5-alpine
ports:
- 2368:2368
env_file: .env
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: ${DB_USER}
database__connection__password: ${DB_PASSWORD}
database__connection__database: ${DB_NAME}
url: ${GHOST_URL}
labels:
- traefik.http.routers.ghost.rule=Host(`${GHOST_DOMAIN}`)
- traefik.http.routers.ghost.tls=true
- traefik.http.routers.ghost.tls.certresolver=myresolver
restart: unless-stopped
volumes:
- ghost:/var/lib/ghost/content
db:
image: mariadb:11
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
- mariadb:/var/lib/mysql
volumes:
ghost:
mariadb: