Skip to content

Latest commit

 

History

History

kong-docker-compose

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

kong | docker-compose

up and running
docker-compose up

open http://localhost:8000 enter kong node URL: http://kong:8001

docker-compose.yml
version: "2.1"

services:

  kong-database:
#    image: healthcheck/postgres:alpine
    image: postgres:9.4-alpine
    ports: ["5432:5432"]
    environment:
      POSTGRES_USER: kong
      POSTGRES_DB: kong
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "postgres"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks: [backing-services]

  kong-migration:
    depends_on:
      kong-database:
        condition: service_healthy
    image: kong:latest
    environment:
      KONG_DATABASE: postgres
      KONG_PG_HOST: kong-database
      KONG_CASSANDRA_CONTACT_POINTS: kong-database
    command: kong migrations -v up
    networks: [backing-services]

  kong:
    depends_on:
      kong-database:
        condition: service_healthy
      kong-migration:
        condition: service_started
    image: kong:latest
    environment:
      KONG_DATABASE: postgres
      KONG_PG_HOST: kong-database
      KONG_PG_DATABASE: kong
    ports:
      - "8000:8000"
      - "8001:8001"
      - "8443:8443"
      - "8444:8444"
    healthcheck:
      test: ["CMD-SHELL", "curl -I -s -L http://127.0.0.1:8000 || exit 1"]
      interval: 5s
      retries: 10
    networks: [backing-services]

  dashboard:
    depends_on:
      kong:
        condition: service_healthy
    image: pgbi/kong-dashboard:v2
    ports: ["8080:8080"]
    networks:
      - backing-services
      - public

networks:
  backing-services:
  public:

or you can try existing one

docker-compose Kong official
git clone https://github.com/Kong/docker-kong