-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
74 lines (69 loc) · 1.74 KB
/
docker-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
68
69
70
71
72
73
74
version: "3.8"
services:
mongo_db:
image: mongo
restart: unless-stopped
volumes:
- ./data/mongo_DB:/data/db
healthcheck:
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
redis_db:
image: redis:6.2.5-alpine
restart: unless-stopped
volumes:
- ./data/redis_DB:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 10s
retries: 3
queue_service:
image: rabbitmq:3.9.11-management-alpine
restart: unless-stopped
environment:
AMQP_URL: "${AMQP_URL}"
RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "5672"]
interval: 5s
timeout: 15s
retries: 3
protocol-server-client:
restart: always
build:
context: ./protocol-server-client
dockerfile: ./Dockerfile
depends_on:
mongo_db:
condition: service_healthy
redis_db:
condition: service_healthy
queue_service:
condition: service_healthy
ports:
- 5003:5003
volumes:
- ./protocol-server-client/config:/usr/src/app/config
- ./logs:/usr/src/app/logs
protocol-server-network:
restart: always
build:
context: ./protocol-server-network
dockerfile: ./Dockerfile
depends_on:
mongo_db:
condition: service_healthy
redis_db:
condition: service_healthy
queue_service:
condition: service_healthy
ports:
- 5002:5002
volumes:
- ./protocol-server-network/config:/usr/src/app/config
- ./logs:/usr/src/app/logs