-
Notifications
You must be signed in to change notification settings - Fork 390
/
docker-compose.yml
64 lines (59 loc) · 1.54 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
version: '2.2'
services:
kong-database:
image: postgres:9.5-alpine
container_name: kong-database
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
healthcheck:
test: "pg_isready -U kong && psql -d kong -U kong -c \"SELECT 1=1\""
interval: 10s
timeout: 5s
retries: 5
kong-migration:
image: kong:${KONG_VERSION}
container_name: kong-migration
depends_on:
kong-database:
condition: service_healthy
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
# command: sh -c "kong migrations up && touch migrations_run && sleep 30" # for kong < 0.15
command: sh -c "kong migrations bootstrap && touch migrations_run && sleep 30" # for kong >= 0.15
healthcheck:
test: "if [[ -f migrations_run ]] ; then exit 0; else exit 1; fi"
interval: 10s
timeout: 5s
retries: 5
kong:
image: kong:${KONG_VERSION}
container_name: kong
depends_on:
kong-migration:
condition: service_healthy
healthcheck:
test: "kong health"
interval: 10s
timeout: 5s
retries: 5
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_ADMIN_LISTEN=0.0.0.0:8001
ports:
- 8001:8001
- 8000:8000
kong-dashboard:
build: .
container_name: kong-dashboard
ports:
- 8080:8080
volumes:
- .:/app:cached
- /app/node_modules/
depends_on:
kong:
condition: service_healthy
entrypoint: ./docker/entrypoint_dev.sh