Skip to content

Instantly share code, notes, and snippets.

@hunzo
Created September 15, 2026 02:41
Show Gist options
  • Select an option

  • Save hunzo/982294eb2dee3d430438d94d740cda7d to your computer and use it in GitHub Desktop.

Select an option

Save hunzo/982294eb2dee3d430438d94d740cda7d to your computer and use it in GitHub Desktop.
kong and konga config
# Host bindings. Database/Kong secrets.
ADMIN_HTTP_PORT=18001
ADMIN_HTTPS_PORT=18444
PROXY_BIND_IP=0.0.0.0
PROXY_HTTP_PORT=80
PROXY_HTTPS_PORT=443
# KONGA_BIND_IP=0.0.0.0
KONGA_PORT=1337
KONGA_IMAGE=pantsel/konga:latest
# kong
KONG_DATABASE=postgres
KONG_PG_HOST=kong-db
KONG_PG_USER=kong
KONG_PG_PASSWORD=change-me
KONG_PG_DATABASE=kong
KONG_ADMIN_LISTEN=0.0.0.0:8001
KONG_LUA_SSL_TRUSTED_CERTIFICATE=/etc/ssl/certs/ca-certificates.crt
TZ=Asia/Bangkok
# kong-db
POSTGRES_DB=kong
POSTGRES_USER=kong
POSTGRES_PASSWORD=change-me
name: template
services:
kong-db:
image: postgres:15.19
restart: unless-stopped
env_file:
- .env
volumes:
- ./db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 2s
retries: 15
networks:
- proxy-network
kong-migrations:
# image: kong/kong-gateway:3.14 # enterprise version
image: kong:3.9.3 # community version
restart: "no"
env_file:
- .env
depends_on:
kong-db:
condition: service_healthy
command:
- /bin/sh
- -c
- >-
kong migrations bootstrap || (kong migrations up && kong migrations finish)
networks:
- proxy-network
ulimits:
nofile:
soft: 65535
hard: 65535
kong:
# image: kong/kong-gateway:3.14 # enterprise version
image: kong:3.9.3 # community version
restart: unless-stopped
env_file:
- .env
depends_on:
kong-migrations:
condition: service_completed_successfully
ports:
- "127.0.0.1:${ADMIN_HTTP_PORT:-18001}:8001"
- "127.0.0.1:${ADMIN_HTTPS_PORT:-18444}:8444"
- "${PROXY_BIND_IP:-0.0.0.0}:${PROXY_HTTP_PORT:-9080}:8000"
- "${PROXY_BIND_IP:-0.0.0.0}:${PROXY_HTTPS_PORT:-9443}:8443"
healthcheck:
test: ["CMD", "kong", "health"]
interval: 5s
timeout: 2s
retries: 15
networks:
- proxy-network
ulimits:
nofile:
soft: 65535
hard: 65535
konga:
image: ${KONGA_IMAGE:-pantsel/konga:latest}
restart: unless-stopped
environment:
NODE_ENV: production
SKIP_PRODUCTION_WARNINGS: "true"
NODE_OPTIONS: --no-deprecation
TZ: ${TZ:-Asia/Bangkok}
volumes:
- ./kongadata:/app/kongadata
ports:
- "${KONGA_BIND_IP:-127.0.0.1}:${KONGA_PORT:-1337}:1337"
networks:
- proxy-network
networks:
proxy-network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment