-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathdocker-compose.yml
84 lines (79 loc) · 2.36 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3.7'
services:
db:
build:
context: postgres
environment:
POSTGRES_USERS: ${KONG_DB_USERNAME}:${KONG_DB_PASSWORD}|${KONGA_DB_USERNAME}:${KONGA_DB_PASSWORD}
POSTGRES_DATABASES: ${KONG_DB_NAME}:${KONG_DB_USERNAME}|${KONGA_DB_NAME}:${KONGA_DB_USERNAME}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${KONG_DB_USERNAME}"]
interval: 30s
timeout: 30s
retries: 3
restart: on-failure
stdin_open: true
tty: true
volumes:
- persist_volume:/var/lib/postgresql/data
networks:
- kong-net
kong-migrations:
image: kong:latest
entrypoint: sh -c "sleep 10 && kong migrations bootstrap -v"
environment:
KONG_DATABASE: ${KONG_DATABASE}
KONG_PG_HOST: ${KONG_DB_HOST}
KONG_PG_DATABASE: ${KONG_DB_NAME}
KONG_PG_USER: ${KONG_DB_USERNAME}
KONG_PG_PASSWORD: ${KONG_DB_PASSWORD}
depends_on:
- db
networks:
- kong-net
restart: on-failure
kong:
image: kong:latest
environment:
KONG_DATABASE: ${KONG_DATABASE}
KONG_PG_HOST: ${KONG_DB_HOST}
KONG_PG_DATABASE: ${KONG_DB_NAME}
KONG_PG_USER: ${KONG_DB_USERNAME}
KONG_PG_PASSWORD: ${KONG_DB_PASSWORD}
KONG_PROXY_ACCESS_LOG: ${KONG_PROXY_ACCESS_LOG}
KONG_ADMIN_ACCESS_LOG: ${KONG_ADMIN_ACCESS_LOG}
KONG_PROXY_ERROR_LOG: ${KONG_PROXY_ERROR_LOG}
KONG_ADMIN_ERROR_LOG: ${KONG_ADMIN_ERROR_LOG}
#KONG_ADMIN_LISTEN: ${KONG_ADMIN_LISTEN}
restart: on-failure
ports:
- $KONG_PROXY_PORT:8000
- $KONG_PROXY_SSL_PORT:8443
#- $KONG_PROXY_ADMIN_API_PORT:8001
#- $KONG_PROXY_ADMIN_SSL_API_PORT:8444
networks:
- kong-net
konga:
image: pantsel/konga
environment:
TOKEN_SECRET: ${KONGA_TOKEN_SECRET}
DB_ADAPTER: ${KONG_DATABASE}
DB_HOST: ${KONGA_DB_HOST}
DB_PORT: ${KONGA_DB_PORT}
DB_DATABASE: ${KONGA_DB_NAME}
DB_USER: ${KONGA_DB_USERNAME}
DB_PASSWORD: ${KONGA_DB_PASSWORD}
NODE_ENV: ${KONGA_ENV}
KONGA_HOOK_TIMEOUT: 10000
restart: on-failure
ports:
- $KONGA_PORT:1337
depends_on:
- db
networks:
- kong-net
volumes:
persist_volume:
networks:
kong-net:
external: true