forked from Kong/docker-kong-js-pdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
33 lines (32 loc) · 1.22 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
version: "3.9"
services:
kong:
build: .
user: "${KONG_USER:-kong}"
volumes:
- ./plugins:/usr/local/kong/js-plugins
- ./config:/etc/kong/declarative
environment:
# Use the config defined in config/kong.yml
KONG_DATABASE: "off"
KONG_DECLARATIVE_CONFIG: /etc/kong/declarative/kong.yml
# Show all output in the terminal when running with Docker
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
# Enable the JS plugin server
KONG_PLUGINSERVER_NAMES: js
KONG_PLUGINSERVER_JS_SOCKET: /usr/local/kong/js_pluginserver.sock
KONG_PLUGINSERVER_JS_START_CMD: /usr/local/bin/kong-js-pluginserver -v --plugins-directory /usr/local/kong/js-plugins
KONG_PLUGINSERVER_JS_QUERY_CMD: /usr/local/bin/kong-js-pluginserver --plugins-directory /usr/local/kong/js-plugins --dump-all-plugins
# Allow plugins to be used. The plugin name is your JS file name e.g. hello.js
KONG_PLUGINS: bundled
ports:
- "8000:8000/tcp"
healthcheck:
test: ["CMD", "kong", "health"]
interval: 10s
timeout: 10s
retries: 10
restart: on-failure