ghost: migrated to v6 + Docker Compose setup

This commit is contained in:
2026-07-09 02:14:16 -07:00
parent 7f860d47b9
commit 1934ce36af
9 changed files with 144 additions and 96 deletions

View File

@@ -0,0 +1,42 @@
---
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