Skip to content

Instantly share code, notes, and snippets.

@chowdhary987
Created January 29, 2019 12:51
Show Gist options
  • Save chowdhary987/27d472fb7aa9e81b9f99f22dcaf18f22 to your computer and use it in GitHub Desktop.
Save chowdhary987/27d472fb7aa9e81b9f99f22dcaf18f22 to your computer and use it in GitHub Desktop.
Kong and Konga dashboard
version: '2.1'
services:
kong-migrations:
image: "${KONG_DOCKER_TAG:-kong:0.14.1-alpine}"
command: kong migrations up
depends_on:
db:
condition: service_healthy
environment:
KONG_DATABASE: postgres
KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong}
KONG_PG_HOST: db
KONG_PG_PASSWORD: ${KONG_PG_PASSWORD:-kong}
KONG_PG_USER: ${KONG_PG_USER:-kong}
links:
- db:db
kong:
image: "${KONG_DOCKER_TAG:-kong:0.14.1-alpine}"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://kong:8001"]
interval: 5s
timeout: 2s
retries: 15
environment:
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_ADMIN_LISTEN: '0.0.0.0:8001'
KONG_CASSANDRA_CONTACT_POINTS: db
KONG_DATABASE: postgres
KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong}
KONG_PG_HOST: db
KONG_PG_PASSWORD: ${KONG_PG_PASSWORD:-kong}
KONG_PG_USER: ${KONG_PG_USER:-kong}
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
links:
- db:db
- fluentd
ports:
- "8000:8000/tcp"
- "8001:8001/tcp"
- "8443:8443/tcp"
- "8444:8444/tcp"
restart: on-failure
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
tag: httpd.access
db:
image: postgres:9.5-alpine
environment:
POSTGRES_DB: ${KONG_PG_DATABASE:-kong}
POSTGRES_PASSWORD: ${KONG_PG_PASSWORD:-kong}
POSTGRES_USER: ${KONG_PG_USER:-kong}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${KONG_PG_USER:-kong}"]
interval: 30s
timeout: 30s
retries: 3
restart: on-failure
stdin_open: true
tty: true
volumes:
- ./postgresql:/var/lib/postgresql/data
links:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
tag: httpd.access
kong-dashboard:
image: pgbi/kong-dashboard:v3.5.0
command: 'start --kong-url http://172.17.0.1:8001'
ports:
- 8080:8080
depends_on:
kong:
condition: service_healthy
fluentd:
build: ./fluentd
volumes:
- ./fluentd/conf:/fluentd/etc
links:
- "elasticsearch"
ports:
- "24224:24224"
- "24224:24224/udp"
elasticsearch:
image: elasticsearch:5.3.0
expose:
- 9200
ports:
- "9200:9200"
kibana:
image: kibana:5.3.0
links:
- "elasticsearch"
ports:
- "5601:5601"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment