-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
125 lines (116 loc) · 2.89 KB
/
docker-compose.prod.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
x-minio-common: &minio-common
image: quay.io/minio/minio:latest
command: server --address ":9000" --console-address ":9001" http://minio{1...4}/minio.data{1...2}
expose:
- "9000"
- "9001"
environment:
- MINIO_ROOT_USER=Q3AM3UQ867SPQQA43P2F
- MINIO_ROOT_PASSWORD=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
healthcheck:
test: [ "CMD", "mc", "ready", "local" ]
interval: 5s
timeout: 5s
retries: 5
services:
postgres:
image: postgres:16-alpine
hostname: postgres
restart: on-failure
environment:
POSTGRES_DB: webchat
POSTGRES_USER: sanity
POSTGRES_PASSWORD: wordpass
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s
timeout: 60s
retries: 5
start_period: 10s
expose:
- "5432"
volumes:
- postgres.data:/var/lib/postgresql/users:rw
centrifugo:
image: centrifugo/centrifugo:v5.4.2
hostname: centrifugo
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8000/health || exit 1
interval: 15s
retries: 5
start_period: 10s
timeout: 5s
expose:
- "8000"
volumes:
- ./config/centrifugo/config.json:/centrifugo/config.json
command: centrifugo -c config.json --health --swagger
minio1:
<<: *minio-common
hostname: minio1
volumes:
- minio.data1-1:/minio.data1
- minio.data1-2:/minio.data2
minio2:
<<: *minio-common
hostname: minio2
volumes:
- minio.data2-1:/minio.data1
- minio.data2-2:/minio.data2
minio3:
<<: *minio-common
hostname: minio3
volumes:
- minio.data3-1:/minio.data1
- minio.data3-2:/minio.data2
minio4:
<<: *minio-common
hostname: minio4
volumes:
- minio.data4-1:/minio.data1
- minio.data4-2:/minio.data2
nginx:
build:
context: config/nginx
dockerfile: Dockerfile-prod
restart: on-failure
ports:
- "80:80"
- "9000:9000"
- "9001:9001"
- "443:443"
volumes:
- ./config/nginx/conf.prod/:/etc/nginx/conf.d/
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
webchat-service:
hostname: webchat-service
build:
context: .
dockerfile: webchat-service/Dockerfile
env_file:
- ./webchat-service/.env.prod
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1
interval: 20s
retries: 5
start_period: 10s
timeout: 5s
expose:
- "8080"
depends_on:
postgres:
condition: service_started
centrifugo:
condition: service_healthy
minio1:
condition: service_started
volumes:
postgres.data: { }
minio.data1-1: { }
minio.data1-2: { }
minio.data2-1: { }
minio.data2-2: { }
minio.data3-1: { }
minio.data3-2: { }
minio.data4-1: { }
minio.data4-2: { }