-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
93 lines (87 loc) · 2.15 KB
/
docker-compose.yaml
File metadata and controls
93 lines (87 loc) · 2.15 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
84
85
86
87
88
89
90
91
92
93
services:
account:
build:
context: .
dockerfile: ./account/app.dockerfile
depends_on:
account_db:
condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:root@account_db:5432/account?sslmode=disable
restart: on-failure
catalog:
build:
context: .
dockerfile: ./catalog/app.dockerfile
depends_on:
catalog_db:
condition: service_healthy
environment:
DATABASE_URL: http://catalog_db:9200
restart: on-failure
order:
build:
context: .
dockerfile: ./order/app.dockerfile
depends_on:
order_db:
condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:root@order_db:5432/orderdb?sslmode=disable
ACCOUNT_SERVICE_URL: account:8080
CATALOG_SERVICE_URL: catalog:8080
restart: on-failure
graphql:
build:
context: .
dockerfile: ./graphql/app.dockerfile
ports:
- 8000:8080
depends_on:
- account
- catalog
- order
environment:
ACCOUNT_SERVICE_URL: account:8080
CATALOG_SERVICE_URL: catalog:8080
ORDER_SERVICE_URL: order:8080
restart: on-failure
account_db:
build:
context: ./account
dockerfile: ./db.dockerfile
environment:
POSTGRES_DB: account
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
catalog_db:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
environment:
ES_JAVA_OPTS: -Xms1g -Xmx1g
discovery.type: single-node
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 20s
timeout: 10s
retries: 10
restart: unless-stopped
order_db:
build:
context: ./order
dockerfile: ./db.dockerfile
environment:
POSTGRES_DB: orderdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped