Skip to content

Instantly share code, notes, and snippets.

@johnallen3d
Created March 26, 2018 21:29
Show Gist options
  • Select an option

  • Save johnallen3d/f2682b283a6252b2f7965446584cf984 to your computer and use it in GitHub Desktop.

Select an option

Save johnallen3d/f2682b283a6252b2f7965446584cf984 to your computer and use it in GitHub Desktop.
Basic Kong + Postgres setup in Docker (compose)
version: '2.3'
services:
web:
image: kong:latest
links:
- db
environment:
- "KONG_DATABASE=postgres"
- "KONG_PG_HOST=db"
- "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_ADMIN_LISTEN_SSL=0.0.0.0:8444"
ports:
- 8000:8000
- 8443:8443
- 8001:8001
- 8444:8444
db:
image: postgres:alpine
ports:
- "5432:5432"
environment:
- "POSTGRES_USER=kong"
- "POSTGRES_DB=kong"
# nib up -d db
# nib run web kong migrations up
# nib up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment