-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
151 lines (139 loc) · 2.99 KB
/
docker-compose.yml
File metadata and controls
151 lines (139 loc) · 2.99 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: '3'
services:
user:
build: ./user
ports:
- "80:80"
- "2112:2112"
networks:
- user-network
- kong-network
user-db:
image: postgres:12.1
environment:
- PGUSER=postgres
volumes:
- ./user-db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- user-network
match:
build: ./match
ports:
- "81:81"
- "2113:2113"
networks:
- match-network
- kong-network
match-db:
image: postgres:12.1
environment:
- PGUSER=postgres
volumes:
- ./match-db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- match-network
auth:
build: ./auth
depends_on:
- kong
ports:
- "82:82"
- "2114:2114"
networks:
- auth-network
- kong-network
auth-db:
image: postgres:12.1
environment:
- PGUSER=postgres
volumes:
- ./auth-db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- auth-network
# API Gateway
kong-migrations:
image: kong:2.0.1
command: kong migrations bootstrap && kong migrations up && kong migrations finish
depends_on:
- kong-db
environment:
KONG_DATABASE: postgres
KONG_PG_DATABASE: kong
KONG_PG_HOST: kong-db
KONG_PG_PASSWORD: kong
KONG_PG_USER: kong
networks:
- kong-network
restart: on-failure
kong:
image: kong:2.0.1
user: kong
depends_on:
- kong-db
environment:
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_ADMIN_LISTEN: '0.0.0.0:8001'
KONG_CASSANDRA_CONTACT_POINTS: kong-db
KONG_DATABASE: postgres
KONG_PG_DATABASE: kong
KONG_PG_HOST: kong-db
KONG_PG_PASSWORD: kong
KONG_PG_USER: kong
networks:
- kong-network
ports:
- "8000:8000/tcp"
- "8001:8001/tcp"
- "8443:8443/tcp"
- "8444:8444/tcp"
healthcheck:
test: ["CMD", "kong", "health"]
interval: 10s
timeout: 10s
retries: 10
restart: on-failure
kong-db:
image: postgres:12.1
environment:
- POSTGRES_DB=kong
- POSTGRES_PASSWORD=kong
- POSTGRES_USER=kong
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 30s
timeout: 30s
retries: 3
restart: on-failure
stdin_open: true
tty: true
networks:
- kong-network
# Metrics
grafana:
image: grafana/grafana:6.6.2
ports:
- "3000:3000"
networks:
- metrics-network
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
prom:
image: prom/prometheus:v2.16.0
ports:
- "9090:9090"
networks:
- metrics-network
- user-network
- match-network
- auth-network
volumes:
- ./prometheus:/etc/prometheus
networks:
user-network:
match-network:
auth-network:
kong-network:
metrics-network: