-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
188 lines (171 loc) · 3.91 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
services:
auth_service:
container_name: auth_service_${COMMIT_HASH}
build:
context: .
dockerfile: build/auth.Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH}
ports:
- "50051:50051"
- "9091:9091"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
env_file:
- .env
volumes:
- .:/app
user_service:
container_name: user_service_${COMMIT_HASH}
build:
context: .
dockerfile: build/user.Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH}
ports:
- "50052:50052"
- "9092:9092"
depends_on:
postgres:
condition: service_started
env_file:
- .env
volumes:
- .:/app
event_service:
container_name: event_service_${COMMIT_HASH}
build:
context: .
dockerfile: build/event.Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH}
ports:
- "50053:50053"
- "9093:9093"
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
volumes:
- .:/app
image_service:
container_name: image_service_${COMMIT_HASH}
build:
context: .
dockerfile: build/image.Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH}
ports:
- "50054:50054"
- "9094:9094"
env_file:
- .env
volumes:
- .:/app
notification_service:
container_name: notification_service_${COMMIT_HASH}
build:
context: .
dockerfile: build/notification.Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH}
ports:
- "50056:50056"
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
volumes:
- .:/app
server_service:
container_name: server_service_${COMMIT_HASH}
build:
context: .
dockerfile: build/server.Dockerfile
args:
COMMIT_HASH: ${COMMIT_HASH}
ports:
- "8080:8080"
depends_on:
auth_service:
condition: service_started
user_service:
condition: service_started
event_service:
condition: service_started
image_service:
condition: service_started
notification_service:
condition: service_started
env_file:
- .env
volumes:
- .:/app
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "8090:9090"
grafana:
image: grafana/grafana-oss:9.4.3
ports:
- "8095:3000"
volumes:
- grafana-data:/var/lib/grafana
postgres:
image: postgis/postgis:latest
container_name: my_pg_container
restart: unless-stopped
env_file:
- .env
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
ports:
- "6379:6379"
node_exporter:
image: prom/node-exporter:latest
container_name: node_exporter
restart: unless-stopped
ports:
- "9100:9100"
nginx:
container_name: nginx
restart: unless-stopped
image: nginx
ports:
- 80:80
- 443:443
depends_on:
server_service:
condition: service_started
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/letsencrypt/live/vyhodnoy.online/fullchain.pem:/etc/ssl/certs/fullchain.pem:ro
- /etc/letsencrypt/live/vyhodnoy.online/privkey.pem:/etc/ssl/private/privkey.pem:ro
- /home/user/Desktop/2024_2_Komanda7/public:/usr/share/nginx/html:ro
- /home/user/Desktop/2024_2_Team7/static/images:/usr/share/nginx/static/images:ro
volumes:
postgres_data:
driver: local
grafana-data:
letsencrypt:
networks:
default:
name: team7_network