Files
my-self-host-services/ghost/docker-compose.yaml
T

74 lines
1.8 KiB
YAML

networks:
ghost:
external: false
caddy:
name: caddy
driver: bridge
external: true
services:
ghost:
image: ghost:6-alpine
container_name: ghost
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- ghost
- caddy
environment:
# DB (MySQL)
database__client: mysql
database__connection__host: db
database__connection__user: ${DATABASE_USER}
database__connection__password: ${DATABASE_PASSWORD}
database__connection__database: ghost
# App
NODE_ENV: production
url: https://aykhans.me
site__url: https://aykhans.me
# Mail
mail__options__host: ${MAIL_HOST}
mail__options__port: ${MAIL_PORT}
mail__options__secure: ${MAIL_SECURE}
mail__options__auth__user: ${MAIL_USERNAME}
mail__options__auth__pass: ${MAIL_PASSWORD}
mail__from: ${MAIL_FROM}
mail__options__service: SMTP
mail__transport: SMTP
volumes:
- ./data/ghost:/var/lib/ghost/content
depends_on:
db:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
db:
image: mysql:8.0.44
container_name: ghost-db
restart: unless-stopped
networks:
- ghost
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DATABASE: ghost
volumes:
- ./data/mysql:/var/lib/mysql
healthcheck:
test:
["CMD-SHELL", "mysqladmin ping -p$$MYSQL_ROOT_PASSWORD -h 127.0.0.1"]
interval: 5s
start_period: 30s
retries: 30
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"