Skip to content

Commit de650c6

Browse files
committed
Update docker-compose.example.yml to use MySQL and latest cache invalidation proxy
1 parent a2866c4 commit de650c6

File tree

1 file changed

+43
-13
lines changed

1 file changed

+43
-13
lines changed

docker-compose.example.yml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,63 @@
11
version: '3.8'
22

33
services:
4+
db:
5+
image: mysql:8.0
6+
restart: always
7+
environment:
8+
MYSQL_ROOT_PASSWORD: rootpassword
9+
MYSQL_DATABASE: ghost
10+
MYSQL_USER: ghost
11+
MYSQL_PASSWORD: ghostpassword
12+
volumes:
13+
- mysql_data:/var/lib/mysql
14+
command: --default-authentication-plugin=mysql_native_password
15+
healthcheck:
16+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$MYSQL_ROOT_PASSWORD"]
17+
interval: 5s
18+
timeout: 5s
19+
retries: 10
20+
421
ghost:
522
image: ghost:5
23+
restart: always
24+
depends_on:
25+
db:
26+
condition: service_healthy
627
environment:
7-
url: http://localhost:4000
8-
database__client: sqlite3
9-
database__connection__filename: /var/lib/ghost/content/data/ghost.db
28+
url: https://yourdomain.com
29+
database__client: mysql
30+
database__connection__host: db
31+
database__connection__user: ghost
32+
database__connection__password: ghostpassword # Match MySQL password
33+
database__connection__database: ghost
34+
# Uncomment and set mail configuration if needed
35+
# mail__transport: SMTP
36+
# mail__options__service:
37+
# mail__options__host:
38+
# mail__options__port:
39+
# mail__options__auth__user:
40+
# mail__options__auth__pass:
1041
volumes:
1142
- ghost_data:/var/lib/ghost/content
1243

1344
cache-invalidation:
14-
build:
15-
context: .
45+
image: magicpages/ghost-cache-invalidation-proxy:latest
46+
restart: always
47+
depends_on:
48+
- ghost
49+
ports:
50+
- "80:4000"
1651
environment:
1752
- GHOST_URL=http://ghost:2368
1853
- PORT=4000
1954
- DEBUG=true
2055
- WEBHOOK_URL=https://api.example.com/invalidate
2156
- WEBHOOK_METHOD=POST
2257
- WEBHOOK_SECRET=your_secret_key
23-
- WEBHOOK_HEADERS={"Custom-Header": "Value", "Authorization": "Bearer ${secret}"}
58+
- WEBHOOK_HEADERS={"Custom-Header": "Value"}
2459
- WEBHOOK_BODY_TEMPLATE={"urls": ${urls}, "timestamp": "${timestamp}", "purgeAll": ${purgeAll}}
25-
- WEBHOOK_RETRY_COUNT=3
26-
- WEBHOOK_RETRY_DELAY=1000
27-
ports:
28-
- "4000:4000"
29-
depends_on:
30-
- ghost
3160

3261
volumes:
33-
ghost_data:
62+
ghost_data:
63+
mysql_data:

0 commit comments

Comments
 (0)