blog/docker-compose.yml

35 lines
868 B
YAML
Raw Normal View History

2022-05-10 22:01:04 -04:00
version: "3"
services:
ghost:
2022-09-14 12:23:01 -04:00
image: ghost:5-alpine
2022-05-10 22:01:04 -04:00
ports:
- 2368:2368
2022-12-05 17:58:19 -05:00
env_file: .env
2022-09-14 12:23:01 -04:00
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
2022-12-05 17:58:19 -05:00
database__connection__user: ${DB_USER}
database__connection__password: ${DB_PASSWORD}
database__connection__database: ${DB_NAME}
url: ${GHOST_API_URL}
labels:
2022-12-05 20:43:17 -05:00
- traefik.http.routers.ghost.rule=Host(`${GHOST_DOMAIN}`)
2022-12-05 17:58:19 -05:00
- traefik.http.routers.ghost.tls=true
- traefik.http.routers.ghost.tls.certresolver=myresolver
2022-05-10 22:01:04 -04:00
restart: unless-stopped
volumes:
- ghost:/var/lib/ghost/content
2022-09-14 12:23:01 -04:00
db:
image: mysql:8.0
restart: always
environment:
2022-12-05 17:58:19 -05:00
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
- mysql:/var/lib/mysql
2022-05-10 22:01:04 -04:00
volumes:
ghost:
2022-12-05 17:58:19 -05:00
mysql: