1
1
version : ' 3.8'
2
2
3
3
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
+
4
21
ghost :
5
22
image : ghost:5
23
+ restart : always
24
+ depends_on :
25
+ db :
26
+ condition : service_healthy
6
27
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:
10
41
volumes :
11
42
- ghost_data:/var/lib/ghost/content
12
43
13
44
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"
16
51
environment :
17
52
- GHOST_URL=http://ghost:2368
18
53
- PORT=4000
19
54
- DEBUG=true
20
55
- WEBHOOK_URL=https://api.example.com/invalidate
21
56
- WEBHOOK_METHOD=POST
22
57
- WEBHOOK_SECRET=your_secret_key
23
- - WEBHOOK_HEADERS={"Custom-Header" : " Value" , "Authorization": "Bearer ${secret}" }
58
+ - WEBHOOK_HEADERS={"Custom-Header" : " Value" }
24
59
- 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
31
60
32
61
volumes :
33
- ghost_data :
62
+ ghost_data :
63
+ mysql_data :
0 commit comments