50 lines
1.4 KiB
YAML
50 lines
1.4 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
|
|
- logging__transports=["stdout"]
|
|
## mail options are per Nodemailer
|
|
- mail__transport=SMTP
|
|
- mail__options__host=${SMTP_HOST}
|
|
- mail__options__port=${SMTP_PORT}
|
|
- mail__options__secure=${SMTP_SECURE}
|
|
- mail__options__auth__user=${SMTP_USER}
|
|
- mail__options__auth__pass=${SMTP_PASSWORD}
|
|
- mail__options__from="'Ghost' <${SMTP_USER}>"
|
|
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
|