blog/docker-compose.yml

33 lines
867 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}
2022-12-08 21:49:48 -05:00
url: ${GHOST_URL}
2022-12-05 17:58:19 -05:00
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:
2024-04-09 17:36:28 -04:00
image: mariadb:11
2022-09-14 12:23:01 -04:00
restart: always
environment:
2022-12-05 17:58:19 -05:00
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
2024-04-09 17:36:28 -04:00
- mariadb:/var/lib/mysql
2022-05-10 22:01:04 -04:00
volumes:
ghost:
2024-04-09 17:36:28 -04:00
mariadb: