Skip to content

Instantly share code, notes, and snippets.

@toast38coza
Last active January 6, 2018 21:44
Show Gist options
  • Save toast38coza/b201813c7859b6912115f8cfdda39a70 to your computer and use it in GitHub Desktop.
Save toast38coza/b201813c7859b6912115f8cfdda39a70 to your computer and use it in GitHub Desktop.
Docker-compose files for Kong
version: "2"
services:
postgres:
image: postgres:9.4
container_name: kong-database
ports:
- "5432:5432"
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
volumes:
- "db-data:/var/lib/postgresql/data"
web:
image: mashape/kong:0.8.0
container_name: kong
environment:
- DATABASE=postgres
restart: always
ports:
- "8000:8000"
- "443:8443"
- "8001:8001"
- "7946:7946"
- "7946:7946/udp"
links:
- postgres
ui:
image: pgbi/kong-dashboard
container_name: kong-dashboard
ports:
- "8080:8080"
volumes:
db-data:
version: "2"
services:
kong-database:
restart: on-failure
image: cassandra:2.2.5
container_name: kong-database
ports:
- "9042:9042"
volumes:
- "db-data:/var/lib/cassandra"
web:
restart: on-failure
image: mashape/kong:0.8.0
container_name: kong
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
- "7946:7946"
- "7946:7946/udp"
links:
- kong-database:kong-database
environment:
- DATABASE=cassandra
security_opt:
- label:seccomp:unconfined
ui:
restart: on-failure
image: pgbi/kong-dashboard
ports:
- "8080:8080"
volumes:
db-data:
version: "2"
services:
kong-database:
image: postgres:9.4
container_name: kong-database
ports:
- "5432:5432"
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
volumes:
- "db-data-kong-postgres:/var/lib/postgresql/data"
kong:
image: kong:0.9.1
container_name: kong
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
restart: always
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
- "7946:7946"
- "7946:7946/udp"
links:
- kong-database
kong-dashboard:
image: pgbi/kong-dashboard
container_name: kong-dashboard
ports:
- "8080:8080"
volumes:
db-data-kong-postgres:
@toast38coza
Copy link
Author

As of 8.0, you can take your pick of backend: Postgres or Cassandra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment