File tree 1 file changed +46
-0
lines changed
05-Docker-Compose-Basics/04-3-Database-Server-Cluster-Behind-Ghost-Web-Server
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+
3
+ services :
4
+ ghost :
5
+ image : ghost
6
+ ports :
7
+ - " 80:2368"
8
+ environment :
9
+ - URL=http://localhost
10
+ - NODE_ENV=production
11
+ - MYSQL_HOST=mysql-primary
12
+ - MYSQL_PASSWORD=mypass
13
+ - MYSQL_DATABASE=ghost
14
+ volumes :
15
+ - ./config.js:/var/lib/ghost/config.js
16
+ depends_on :
17
+ - mysql-primary
18
+ - mysql-secondary
19
+ proxysql :
20
+ image : percona/proxysql
21
+ environment :
22
+ - CLUSTER_NAME=mycluster
23
+ - CLUSTER_JOIN=mysql-primary,mysql-secondary
24
+ - MYSQL_ROOT_PASSWORD=mypass
25
+
26
+ - MYSQL_PROXY_USER=proxyuser
27
+ - MYSQL_PROXY_PASSWORD=s3cret
28
+ mysql-primary :
29
+ image : percona/percona-xtradb-cluster:5.7
30
+ environment :
31
+ - CLUSTER_NAME=mycluster
32
+ - MYSQL_ROOT_PASSWORD=mypass
33
+ - MYSQL_DATABASE=ghost
34
+ - MYSQL_PROXY_USER=proxyuser
35
+ - MYSQL_PROXY_PASSWORD=s3cret
36
+ mysql-secondary :
37
+ image : percona/percona-xtradb-cluster:5.7
38
+ environment :
39
+ - CLUSTER_NAME=mycluster
40
+ - MYSQL_ROOT_PASSWORD=mypass
41
+
42
+ - CLUSTER_JOIN=mysql-primary
43
+ - MYSQL_PROXY_USER=proxyuser
44
+ - MYSQL_PROXY_PASSWORD=s3cret
45
+ depends_on :
46
+ - mysql-primary
You can’t perform that action at this time.
0 commit comments