-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
132 lines (123 loc) · 2.64 KB
/
docker-compose.yml
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
version: "3"
services:
fastapi-cdn-api:
build: ./cdn_api_async_redis/src/
env_file:
- .env
networks:
- backend
expose:
- "8000"
depends_on:
- redis
redis:
image: redis:latest
container_name: redis
privileged: true
networks:
- backend
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 30s
timeout: 10s
retries: 50
minio1:
image: quay.io/minio/minio:latest
command: server --console-address ':9001' http://minio1/data{1...2}
expose:
- "9000"
- "9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
hostname: minio1
networks:
- backend
volumes:
- data1-1:/data1
- data1-2:/data2
minio2:
image: quay.io/minio/minio:latest
command: server --console-address ':9001' http://minio2/data{3...4}
expose:
- "9000"
- "9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
hostname: minio2
networks:
- backend
volumes:
- data2-1:/data3
- data2-2:/data4
minio3:
image: quay.io/minio/minio:latest
command: server --console-address ':9001' http://minio3/data{5...6}
expose:
- "9000"
- "9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
hostname: minio3
networks:
- backend
volumes:
- data3-1:/data5
- data3-2:/data6
minio4:
image: quay.io/minio/minio:latest
command: server --console-address ':9001' http://minio4/data{7...8}
expose:
- "9000"
- "9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
hostname: minio4
networks:
- backend
volumes:
- data4-1:/data7
- data4-2:/data8
nginx:
image: nginx:latest
restart: on-failure
hostname: nginx
networks:
- backend
privileged: true
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d/site.conf:/etc/nginx/conf.d/site.conf:ro
ports:
- "9000:9000"
- "9001:9001"
- "80:80"
depends_on:
- minio1
- minio2
- minio3
- minio4
- fastapi-cdn-api
- redis
volumes:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2:
networks:
backend: