-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
73 lines (68 loc) · 1.48 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
version: "3.9"
services:
user:
container_name: user
build:
context: ./services
dockerfile: ./Dockerfile
target: user
args:
- NAME=user
healthcheck:
test: ["CMD-SHELL", "curl --fail http://user:5000/graphql || exit 1"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./services/user:/services/user
ports:
- 5001:5000
product:
container_name: product
build:
context: ./services
dockerfile: ./Dockerfile
target: product
args:
- NAME=product
healthcheck:
test: ["CMD-SHELL", "curl --fail http://product:5000/graphql || exit 1"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./services/product:/services/product
ports:
- 5002:5000
order:
container_name: order
build:
context: ./services
dockerfile: ./Dockerfile
target: order
args:
- NAME=order
healthcheck:
test: ["CMD-SHELL", "curl --fail http://order:5000/graphql || exit 1"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./services/order:/services/order
ports:
- 5003:5000
gateway:
container_name: gateway
build:
context: ./gateway
dockerfile: ./Dockerfile
volumes:
- ./gateway:/app:rw,cached
- gateway_modules:/app/node_modules
ports:
- "4000:80"
depends_on:
user:
condition: service_healthy
volumes:
gateway_modules: ~