43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
---
|
|
services:
|
|
ghost:
|
|
image: ghost:6
|
|
container_name: ghost
|
|
pull_policy: always
|
|
restart: unless-stopped
|
|
ports:
|
|
- 127.0.0.1:${PORT}:2368
|
|
environment:
|
|
- url=${BASE_URL}
|
|
- database__client=mysql
|
|
- database__connection__host=db
|
|
- database__connection__user=ghost
|
|
- database__connection__password=${DB_PASSWORD}
|
|
- database__connection__database=ghost
|
|
- mail__transport=Direct
|
|
- logging__transports=["stdout"]
|
|
volumes:
|
|
- ${VOLUME_PATH}/content:/var/lib/ghost/content
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: mysql:8
|
|
container_name: ghost-mysql
|
|
pull_policy: always
|
|
restart: unless-stopped
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
|
|
- MYSQL_USER=ghost
|
|
- MYSQL_PASSWORD=${DB_PASSWORD}
|
|
- MYSQL_DATABASE=ghost
|
|
volumes:
|
|
- ${VOLUME_PATH}/mysql:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "--password=${DB_ROOT_PASSWORD}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|