-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
121 lines (115 loc) · 2.61 KB
/
docker-compose.yml
File metadata and controls
121 lines (115 loc) · 2.61 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: '3.8'
networks:
cluster_network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
services:
# Mock Flux API Server
mock-api:
image: nginx:alpine
container_name: mock-flux-api
ports:
- "8080:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./mock-api:/usr/share/nginx/html:ro
networks:
cluster_network:
ipv4_address: 172.20.0.5
restart: unless-stopped
# PostgreSQL Cluster Node 1
postgres-node1:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
ports:
- "5432:5432"
- "8008:8008"
- "2379:2379"
- "2380:2380"
hostname: postgres-cluster-node1
volumes:
- postgres_data1:/var/lib/postgresql/data
- etcd_data1:/var/lib/etcd
- ssl_certs1:/etc/ssl/cluster
- /etc/localtime:/etc/localtime:ro
networks:
cluster_network:
ipv4_address: 172.20.0.10
restart: unless-stopped
environment:
- PGDATA=/var/lib/postgresql/data
- FLUX_API_URL=http://172.20.0.5:80
- SSL_ENABLED=true
depends_on:
- mock-api
# PostgreSQL Cluster Node 2
postgres-node2:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
ports:
- "5433:5432"
- "8009:8008"
- "2381:2379"
- "2382:2380"
hostname: postgres-cluster-node2
volumes:
- postgres_data2:/var/lib/postgresql/data
- etcd_data2:/var/lib/etcd
- ssl_certs2:/etc/ssl/cluster
- /etc/localtime:/etc/localtime:ro
networks:
cluster_network:
ipv4_address: 172.20.0.11
restart: unless-stopped
environment:
- PGDATA=/var/lib/postgresql/data
- FLUX_API_URL=http://172.20.0.5:80
- SSL_ENABLED=true
depends_on:
- mock-api
# PostgreSQL Cluster Node 3
postgres-node3:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
ports:
- "5434:5432"
- "8010:8008"
- "2383:2379"
- "2384:2380"
hostname: postgres-cluster-node3
volumes:
- postgres_data3:/var/lib/postgresql/data
- etcd_data3:/var/lib/etcd
- ssl_certs3:/etc/ssl/cluster
- /etc/localtime:/etc/localtime:ro
networks:
cluster_network:
ipv4_address: 172.20.0.12
restart: unless-stopped
environment:
- PGDATA=/var/lib/postgresql/data
- FLUX_API_URL=http://172.20.0.5:80
- SSL_ENABLED=true
depends_on:
- mock-api
volumes:
postgres_data1:
postgres_data2:
postgres_data3:
etcd_data1:
etcd_data2:
etcd_data3:
ssl_certs1:
ssl_certs2:
ssl_certs3: