-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
52 lines (48 loc) · 1.5 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
version: '3'
services:
redis-server:
container_name: redis-ratelimit
image: 'redis'
ports:
- "6379:6379"
kong:
image: kong:3.0-ubuntu
environment:
- 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_DATABASE=off
- KONG_DECLARATIVE_CONFIG=/plugin-development/kong.yml
- KONG_PLUGINS=bundled,${NAME}
- KONG_MYPLUGIN_SOMEDATA={"foo":"bar","baz":"cux"}
- KONG_VAULT_DATA={"foo":"bar","baz":"this string comes from kong vault"}
- KONG_NGINX_MAIN_ENV=KONG_NAME
- KONG_NAME=my-kong
volumes:
- plugin-development:/plugin-development
user: "0:0"
command:
- /bin/bash
- -c
- |
mkdir -p /usr/local/lib/luarocks/rocks-5.1/kong-plugin-${NAME}/${VERSION}-1/
ln -s /plugin-development/kong-plugin-${NAME}-${VERSION}-1.rockspec /usr/local/lib/luarocks/rocks-5.1/kong-plugin-${NAME}/${VERSION}-1/kong-plugin-${NAME}-${VERSION}-1.rockspec
ln -s /plugin-development/kong/plugins/${NAME} /usr/local/share/lua/5.1/kong/plugins/${NAME}
/docker-entrypoint.sh kong start --vv
ports:
- "8000:8000"
- "8001:8001"
volumes:
plugin-development:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/
networks:
default:
name: kong-plugin-development
driver: bridge