This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
forked from pantsel/konga
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
99 lines (92 loc) · 2.27 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "3"
networks:
kong-net:
driver: bridge
services:
konga:
image: onematchfox/konga
build:
context: .
networks:
- kong-net
depends_on:
- kong
- kong-database
ports:
- "1337:1337"
environment:
KONGA_LOG_LEVEL: debug
KONGA_SEED_KONG_NODE_DATA_SOURCE_FILE: /etc/conf/konga/kong_node.data
KONGA_SEED_USER_DATA_SOURCE_FILE: /etc/conf/konga/konga_user.data
# Use Postgres DB for storage
DB_ADAPTER: postgres
DB_HOST: kong-database
DB_USER: kong
DB_PASSWORD: abc123!$$%:?&*()-_=+[]{}<>
# NODE_ENV: production
volumes:
- "./examples:/etc/conf/konga"
#######################################
# Postgres: The database used by Kong
#######################################
kong-database:
image: postgres:13.6
restart: always
networks:
- kong-net
environment:
POSTGRES_USER: kong
POSTGRES_DB: kong
POSTGRES_PASSWORD: abc123!$$%:?&*()-_=+[]{}<>
volumes:
- "kong_database_data:/var/lib/postgresql/data"
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 5s
timeout: 5s
retries: 5
#######################################
# Kong database migration
#######################################
kong-migration:
image: kong:2.4
command: "kong migrations bootstrap"
networks:
- kong-net
restart: on-failure
environment:
KONG_PG_HOST: kong-database
KONG_PG_PASSWORD: abc123!$$%:?&*()-_=+[]{}<>
links:
- kong-database
depends_on:
- kong-database
#######################################
# Kong: The API Gateway
#######################################
kong:
image: kong:2.4
restart: always
networks:
- kong-net
environment:
KONG_PG_HOST: kong-database
KONG_PG_PASSWORD: abc123!$$%:?&*()-_=+[]{}<>
KONG_PROXY_LISTEN: 0.0.0.0:8000
KONG_PROXY_LISTEN_SSL: 0.0.0.0:8443
KONG_ADMIN_LISTEN: 0.0.0.0:8001
depends_on:
- kong-migration
- kong-database
healthcheck:
test: ["CMD", "curl", "-f", "http://kong:8001"]
interval: 5s
timeout: 2s
retries: 15
ports:
- 8001:8001
- 8000:8000
volumes:
kong_database_data: {}