-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
108 lines (100 loc) · 1.99 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
version: "3.8"
services:
nginx:
container_name: nginx
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- opencodelab
depends_on:
- app-server
app-server:
build: .
env_file:
- .env
networks:
- opencodelab
depends_on:
redis-server:
condition: service_healthy
rabbitmq-server:
condition: service_healthy
database:
condition: service_healthy
redis-server:
container_name: redis
image: redis:7.0-alpine3.18
volumes:
- redis-data:/data
networks:
- opencodelab
healthcheck:
test: redis-cli ping
interval: 5s
timeout: 5s
retries: 12
polling-server:
build:
context: ./polling-server
env_file:
- .env
networks:
- opencodelab
depends_on:
redis-server:
condition: service_healthy
rabbitmq-server:
container_name: mq
image: rabbitmq:3.12-alpine
volumes:
- rabbitmq-data:/var/lib/rabbitmq
networks:
- opencodelab
healthcheck:
test: rabbitmq-diagnostics check_running
interval: 5s
timeout: 10s
retries: 3
database:
container_name: db
image: mongo:latest
volumes:
- mongo-data:/data/db
- mongo-data:/data/configdb
networks:
- opencodelab
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
python-sandbox:
build:
dockerfile: Dockerfile._python
env_file:
- .env
networks:
- opencodelab
depends_on:
rabbitmq-server:
condition: service_healthy
node-sandbox:
build:
dockerfile: Dockerfile._node
env_file:
- .env
networks:
- opencodelab
depends_on:
rabbitmq-server:
condition: service_healthy
volumes:
rabbitmq-data:
mongo-data:
redis-data:
networks:
opencodelab:
name: opencodelab