-
Notifications
You must be signed in to change notification settings - Fork 1
/
kong.yml
95 lines (87 loc) · 2.38 KB
/
kong.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
version: "3"
services:
# Kong can use cassandra or postgres. Cassandra was taking a little too
# much RAM.
kongdb:
image: postgres:9.4
environment:
POSTGRES_USER: kong
POSTGRES_DB: kong
POSTGRES_PASSWORD: ${KONG_POSTGRES_PASSWORD}
# Do not expose the ports unless you actually need to use the databse
# from other networks.
# ports:
# - "5432:5432"
deploy:
restart_policy:
condition: any
resources:
limits:
cpus: "0.25"
memory: 1G
# Master kong container.
kong:
image: felicityiiith/kong
depends_on:
- kongdb
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kongdb
KONG_PG_PASSWORD: ${KONG_POSTGRES_PASSWORD}
KONG_PG_DATABASE: kong
# Custom plugins should be added here. Default ones can be set using
# admin API or admin dashboard.
KONG_CUSTOM_PLUGINS: oidc
# Kong will be receiving requests from Yui's HAproxy. So, this
# should be set to X-Real-Client-IPr for rate limiting plugin to work.
KONG_REAL_IP_HEADER: X-Real-Client-IP
ports:
- "9000:8000"
deploy:
restart_policy:
condition: any
resources:
limits:
cpus: "0.25"
memory: 1G
# Kong Admin Dashboard.
kong_dashboard:
image: pgbi/kong-dashboard
depends_on:
- kong
ports:
- 9001:8080
# Add more users by appending user=password
# You might also want to try kong:8444. But who will monitor packets
# inside docker network? :P
command: start --kong-url http://kong:8001 --basic-auth admin=${KONG_ADMIN_PASSWORD}
deploy:
restart_policy:
condition: any
resources:
limits:
cpus: "0.25"
memory: 200M
########## CONTEST SERVICES ##########
portaldb:
image: mariadb:10
volumes:
- portaldb:/var/lib/mysql
- ./portals_initdb.sql:/docker-entrypoint-initdb.d/portals_initdb.sql
environment:
# Make root password instead of random root password for backup since no sqldumps
MYSQL_ROOT_PASSWORD: ${KONG_PORTALDB_ROOT_PASSWORD}
portaladmin:
image: adminer
environment:
ADMINER_DEFAULT_SERVER: portaldb
ports:
- 9002:8080
portaladmineditor:
image: frans/adminer-editor
environment:
ADMINER_DEFAULT_SERVER: portaldb
ports:
- 9003:8080
volumes:
portaldb: