forked from narate/kong-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (71 loc) · 2.43 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
version: "3.7"
services:
kong-database:
image: postgres:${POSTGRES_VERSION:-latest}
container_name: kong-database
environment:
- POSTGRES_USER=${POSTGRES_USER:-kong}
- POSTGRES_DB=${POSTGRES_DB:-kong}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-kong}
volumes:
- ./pg_data:/var/lib/postgresql/data
networks:
- backend
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
kong:
depends_on:
- kong-database
image: kong:${KONG_VERSION:-latest}
container_name: kong
restart: always
environment:
- TZ=${TZ:-Asia/Bangkok}
- KONG_DATABASE=postgres
- KONG_PG_HOST=${KONG_PG_HOST:-kong-database}
- KONG_PG_DATABASE=${POSTGRES_DB:-kong}
- KONG_PG_USER=${POSTGRES_USER:-kong}
- KONG_PG_PASSWORD=${POSTGRES_PASSWORD:-kong}
- KONG_ADMIN_LISTEN=${KONG_ADMIN_LISTEN:-127.0.0.1:8001}
- KONG_PROXY_LISTEN=${KONG_PROXY_LISTEN:-0.0.0.0:8000, 0.0.0.0:8443 ssl http2}
- KONG_NGINX_HTTP_RESOLVER=${KONG_NGINX_HTTP_RESOLVER:-8.8.8.8}
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_TRUSTED_IPS=0.0.0.0/0,::/0
- KONG_REAL_IP_RECURSIVE=on
- KONG_LUA_SSL_TRUSTED_CERTIFICATE=system
ports:
- 80:8000
- 443:8443
- 127.0.0.1:8001:8001
networks:
- backend
healthcheck:
test: ["CMD", "kong", "health"]
interval: 5s
timeout: 2s
retries: 15
# https://github.com/pantsel/konga/issues/462#issuecomment-633209833
konga:
image: pantsel/konga
container_name: konga
restart: always
environment:
# For use build-in filesystem db,
# Konga creator said `I've done it with no problems on production environments.`
# But the default `sails-disk` adapter is not designed for use as a production database;
- NODE_ENV=development
ports:
- 0.0.0.0:1337:1337
networks:
- backend
volumes:
- ./konga_data:/app/kongadata
networks:
backend:
external:
name: backend