forked from preply/graphene-federation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (77 loc) · 2.05 KB
/
docker-compose.yml
File metadata and controls
83 lines (77 loc) · 2.05 KB
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
version: '2.1'
services:
service_a:
build: service_a/.
volumes:
- ./service_a/src:/project/src
- ../:/project/federation_deps
command: sh -c "pip install ./federation_deps && python ./src/app.py"
healthcheck:
test: ["CMD", "curl", "-XGET", "http://0.0.0.0:5000/graphql"]
interval: 1s
timeout: 10s
retries: 10
service_b:
build: service_b/.
volumes:
- ./service_b/src:/project/src
- ../:/project/federation_deps
command: sh -c "pip install ./federation_deps && python ./src/app.py"
healthcheck:
test: ["CMD", "curl", "-XGET", "http://0.0.0.0:5000/graphql"]
interval: 1s
timeout: 10s
retries: 10
service_c:
build: service_c/.
volumes:
- ./service_c/src:/project/src
- ../:/project/federation_deps
command: sh -c "pip install ./federation_deps && python ./src/app.py"
healthcheck:
test: ["CMD", "curl", "-XGET", "http://0.0.0.0:5000/graphql"]
interval: 1s
timeout: 10s
retries: 10
service_d:
build: service_d/.
volumes:
- ./service_d/src:/project/src
- ../:/project/federation_deps
command: sh -c "pip install ./federation_deps && python ./src/app.py"
healthcheck:
test: ["CMD", "curl", "-XGET", "http://0.0.0.0:5000/graphql"]
interval: 1s
timeout: 10s
retries: 10
federation:
build: federation/.
volumes:
- ./federation/src:/project/src
ports:
- 3000:3000
healthcheck:
test: ["CMD", "curl", "-f", "-XGET", "http://localhost:3000/.well-known/apollo/server-health"]
interval: 3s
timeout: 10s
retries: 5
depends_on:
service_a:
condition: service_healthy
service_b:
condition: service_healthy
service_c:
condition: service_healthy
service_d:
condition: service_healthy
proxy_dep:
image: busybox
depends_on:
federation:
condition: service_healthy
tests:
build: tests/.
volumes:
- ./tests:/project/tests
depends_on:
- proxy_dep