-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (56 loc) · 2.04 KB
/
docker-compose.yml
File metadata and controls
58 lines (56 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
services:
db:
image: mysql:8.0
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./data/ghost_db:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
ghost:
image: ghost:6-alpine
restart: unless-stopped
ports:
- "2368:2368"
depends_on:
db:
condition: service_healthy
environment:
NODE_ENV: development
url: http://localhost:2368
database__client: mysql
database__connection__host: db
database__connection__port: 3306
database__connection__database: ${MYSQL_DATABASE}
database__connection__user: ${MYSQL_USER}
database__connection__password: ${MYSQL_PASSWORD}
volumes:
# Named volumes for persistent data — NOT on /content root
- ./data/content_data:/var/lib/ghost/content/data
- ./data/content_images:/var/lib/ghost/content/images
- ./data/content_logs:/var/lib/ghost/content/logs
# Theme bind mounts
- ./themes/Source:/var/lib/ghost/content/themes/Source
- ./themes/theme-one:/var/lib/ghost/content/themes/theme-one
- ./themes/theme-two:/var/lib/ghost/content/themes/theme-two
# Hide node_modules and .git from the container — Ghost's entrypoint
# runs chown recursively and fails on pnpm symlinks and .git packfiles
- /var/lib/ghost/content/themes/Source/node_modules
- /var/lib/ghost/content/themes/theme-one/node_modules
- /var/lib/ghost/content/themes/theme-two/node_modules
dev:
image: node:22-alpine
working_dir: /workspace
command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev"
volumes:
- .:/workspace
- ./data/dev_node_modules:/workspace/node_modules
restart: unless-stopped