-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (60 loc) · 1.23 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
version: "3.8"
services:
mongodb:
image: mongo:latest
ports:
- "27017:27017"
networks:
- xpulse
volumes:
- mongodb_data:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 3
xmock:
build:
context: ./xmock
dockerfile: Dockerfile
ports:
- "3001:3000"
volumes:
- ./xmock:/usr/src/app
command: node server.js
environment:
- NODE_VERSION=20
networks:
- xpulse
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/ || exit 1"]
interval: 10s
timeout: 10s
retries: 3
start_period: 10s
xend:
build:
context: ./xend
dockerfile: Dockerfile
ports:
- "3002:3000"
volumes:
- ./xend:/usr/src/app
command: npm run start:prod
environment:
- NODE_VERSION=20
- MONGODB_URI=mongodb://mongodb:27017/xend
- XMOCK_URL=http://xmock:3000
networks:
- xpulse
depends_on:
mongodb:
condition: service_healthy
xmock:
condition: service_healthy
volumes:
mongodb_data:
mongodb_config:
networks:
xpulse:
driver: bridge