Created
August 19, 2019 09:09
-
-
Save hotakasaito/1162506c1a9ffed38ecea7a686145f10 to your computer and use it in GitHub Desktop.
kong-konga-docker-compose.yml v2.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.1' | |
volumes: | |
kong_data: {} | |
networks: | |
kong-net: | |
services: | |
kong-migrations: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
command: kong migrations bootstrap | |
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 | |
networks: | |
- kong-net | |
restart: on-failure | |
kong-migrations-up: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
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 | |
networks: | |
- kong-net | |
restart: on-failure | |
kong: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
user: "${KONG_USER:-root}" | |
depends_on: | |
db: | |
condition: service_healthy | |
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 | |
networks: | |
- kong-net | |
ports: | |
- "8000:8000/tcp" | |
- "8001:8001/tcp" | |
- "8443:8443/tcp" | |
- "8444:8444/tcp" | |
healthcheck: | |
test: ["CMD", "kong", "health"] | |
interval: 10s | |
timeout: 10s | |
retries: 10 | |
restart: on-failure | |
db: | |
image: postgres:9.5 | |
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 | |
networks: | |
- kong-net | |
volumes: | |
- kong_data:/var/lib/postgresql/data | |
konga: | |
image: pantsel/konga:next | |
restart: always | |
networks: | |
- kong-net | |
environment: | |
DB_ADAPTER: postgres | |
DB_HOST: db | |
DB_USER: ${KONG_PG_USER:-kong} | |
DB_PASSWORD: ${KONG_PG_PASSWORD:-kong} | |
TOKEN_SECRET: km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb | |
DB_DATABASE: ${KONG_PG_DATABASE:-kong} | |
NODE_ENV: development | |
depends_on: | |
- db | |
ports: | |
- "1337:1337" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment