49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
version: '3'
|
|
services:
|
|
postgres:
|
|
image: postgres:9.6
|
|
container_name: postgres
|
|
networks:
|
|
- kong-net
|
|
environment:
|
|
- POSTGRES_USER=api
|
|
- POSTGRES_PASSWORD=api
|
|
- POSTGRES_DB=api
|
|
# persist the postgres data to disk so we don't lose it
|
|
# on rebuilds.
|
|
volumes:
|
|
- ./postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- '5432:5432'
|
|
kong:
|
|
image: kong:3.1.1
|
|
container_name: kong
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- kong-net
|
|
environment:
|
|
- KONG_DATABASE=postgres
|
|
- KONG_PG_HOST=postgres
|
|
- KONG_PG_DATABASE=kong
|
|
- KONG_PG_USER=api
|
|
- KONG_PG_PASSWORD=api
|
|
- 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, 0.0.0.0:8444 ssl
|
|
- KONG_LUA_PACKAGE_PATH=/usr/local/custom/?.lua;;
|
|
- KONG_PLUGINS=bundled,zeroex-headers
|
|
- KONG_LOG_LEVEL=debug
|
|
volumes:
|
|
- ./kong:/usr/local/custom/kong
|
|
ports:
|
|
- '8000:8000'
|
|
- '8443:8443'
|
|
- '127.0.0.1:8001:8001'
|
|
- '127.0.0.1:8444:8444'
|
|
networks:
|
|
kong-net:
|
|
name: kong-net
|