-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloud.docker-compose.yml
More file actions
153 lines (144 loc) · 3.69 KB
/
cloud.docker-compose.yml
File metadata and controls
153 lines (144 loc) · 3.69 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: onebillioncheckboxes
services:
redis-1:
image: australia-southeast2-docker.pkg.dev/billionchecks/billionchecks/redis
restart: always
environment:
- REDIS_CLUSTER_ANNOUNCE_IP=172.28.0.101
volumes:
- redis-1-data:/data
networks:
bridge_network:
ipv4_address: 172.28.0.101
healthcheck:
test: redis-cli ping
interval: 30s
timeout: 3s
retries: 3
redis-2:
image: australia-southeast2-docker.pkg.dev/billionchecks/billionchecks/redis
restart: always
environment:
- REDIS_CLUSTER_ANNOUNCE_IP=172.28.0.102
volumes:
- redis-2-data:/data
networks:
bridge_network:
ipv4_address: 172.28.0.102
healthcheck:
test: redis-cli ping
interval: 30s
timeout: 3s
retries: 3
redis-3:
image: australia-southeast2-docker.pkg.dev/billionchecks/billionchecks/redis
restart: always
environment:
- REDIS_CLUSTER_ANNOUNCE_IP=172.28.0.103
volumes:
- redis-3-data:/data
networks:
bridge_network:
ipv4_address: 172.28.0.103
healthcheck:
test: redis-cli ping
interval: 30s
timeout: 3s
retries: 3
app-1:
image: australia-southeast2-docker.pkg.dev/billionchecks/billionchecks/app
restart: always
environment:
- REDIS_ADDRESSES=172.28.0.101:6379,172.28.0.102:6379,172.28.0.103:6379
- SERVER_ADDRESS=:80
env_file:
- $ENV_FILE_PATH
networks:
bridge_network:
healthcheck:
test: nc -z localhost 80 || exit -1
interval: 30s
timeout: 3s
retries: 3
depends_on:
redis-1:
condition: service_healthy
redis-2:
condition: service_healthy
redis-3:
condition: service_healthy
app-2:
image: australia-southeast2-docker.pkg.dev/billionchecks/billionchecks/app
restart: always
environment:
- REDIS_ADDRESSES=172.28.0.101:6379,172.28.0.102:6379,172.28.0.103:6379
- SERVER_ADDRESS=:80
env_file:
- $ENV_FILE_PATH
networks:
bridge_network:
healthcheck:
test: nc -z localhost 80 || exit -1
interval: 30s
timeout: 3s
retries: 3
depends_on:
redis-1:
condition: service_healthy
redis-2:
condition: service_healthy
redis-3:
condition: service_healthy
app-3:
image: australia-southeast2-docker.pkg.dev/billionchecks/billionchecks/app
restart: always
environment:
- REDIS_ADDRESSES=172.28.0.101:6379,172.28.0.102:6379,172.28.0.103:6379
- SERVER_ADDRESS=:80
env_file:
- $ENV_FILE_PATH
networks:
bridge_network:
healthcheck:
test: nc -z localhost 80 || exit -1
interval: 30s
timeout: 3s
retries: 3
depends_on:
redis-1:
condition: service_healthy
redis-2:
condition: service_healthy
redis-3:
condition: service_healthy
nginx:
image: nginx
command: ["nginx", "-g", "daemon off;"]
ports:
- 80:80
- 443:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- /var/www/certbot:/var/www/certbot
- /etc/letsencrypt/live/billionchecks.com/fullchain.pem:/etc/letsencrypt/live/billionchecks.com/fullchain.pem
- /etc/letsencrypt/live/billionchecks.com/privkey.pem:/etc/letsencrypt/live/billionchecks.com/privkey.pem
networks:
bridge_network:
depends_on:
app-1:
condition: service_healthy
app-2:
condition: service_healthy
app-3:
condition: service_healthy
networks:
bridge_network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
gateway: 172.28.0.1
volumes:
redis-1-data:
redis-2-data:
redis-3-data: