-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
91 lines (82 loc) · 2.25 KB
/
docker-compose.yaml
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
version: '3'
services:
dockerhost:
image: qoomon/docker-host
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
restart: on-failure
kong-database:
image: postgres:9.5
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
- POSTGRES_PASSWORD=kong
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5
kong-migration:
image: kong:2.0.3-centos
command: "sleep 10; kong migrations bootstrap ; kong migrations list ; kong migrations up"
restart: on-failure
environment:
KONG_PG_HOST: kong-database
KONG_PG_PASSWORD: kong
links:
- kong-database
depends_on:
- kong-database
opa_server:
image: openpolicyagent/opa
restart: on-failure
ports:
- "8181:8181"
command:
run --server --log-level debug
redis:
image: redis
restart: on-failure
ports:
- "6379:6379"
kong:
image: kong:2.0.3-centos
depends_on:
- kong-database
environment:
- KONG_LUA_SSL_VERIFY_DEPTH=3
- KONG_LUA_SSL_TRUSTED_CERTIFICATE=/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_PG_PASSWORD=kong
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- KONG_LOG_LEVEL=debug
- KONG_PLUGINS=bundled,${NAME}
volumes:
- plugin-development:/plugin-development
user: "0:0"
command:
- /bin/bash
- -c
- |
sleep 12
mkdir -p /usr/local/lib/luarocks/rocks-5.1/${NAME}/${VERSION}/
ln -s /plugin-development/${NAME}-${VERSION}.rockspec /usr/local/lib/luarocks/rocks-5.1/${NAME}/${VERSION}/${NAME}-${VERSION}.rockspec
ln -s /plugin-development/opa /usr/local/share/lua/5.1/kong/plugins/${NAME}
kong migrations bootstrap
kong migrations list
kong migrations up
/usr/local/bin/kong start --run-migrations --vv
ports:
- "8000:8000"
- "8001:8001"
volumes:
plugin-development:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/