-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
67 lines (60 loc) · 1.07 KB
/
compose.yaml
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
---
services:
python-api:
build:
context: ./python
ports:
- "8000:8000"
environment:
- DB_HOST
- DB_PORT
- DB_USER
- DB_PASSWORD
- DB_NAME
- RABBITMQ_HOST
nginx:
image: nginx:1.26.2
configs:
- source: nginx
target: /etc/nginx/nginx.conf
ports:
- "80:80"
depends_on:
- python-api
postgres:
image: postgres:16
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
rabbitmq:
image: rabbitmq:4.0.5-management
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
consumer1:
build:
context: ./api1
depends_on:
rabbitmq:
condition: service_healthy
consumer2:
build:
context: ./api2
depends_on:
rabbitmq:
condition: service_healthy
configs:
nginx:
file: ./nginx.conf
volumes:
db-data: