-
-
Save talhayameen/ce1722e4a28d77f4cb3178dd6e4da39f to your computer and use it in GitHub Desktop.
Kong
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.2' | |
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} | |
networks: | |
- kong-net | |
restart: on-failure | |
kong-migrations-up: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
command: kong migrations up && kong migrations finish | |
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} | |
networks: | |
- kong-net | |
restart: on-failure | |
kong: | |
image: "${KONG_DOCKER_TAG:-kong:latest}" | |
user: "${KONG_USER:-kong}" | |
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 | |
links: | |
- unomi | |
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 | |
environment: | |
NODE_ENV: production | |
stdin_open: true | |
tty: true | |
ports: | |
- 1337:1337/tcp | |
labels: | |
io.rancher.container.pull_image: always | |
networks: | |
- kong-net | |
links: | |
- kong | |
volumes: # Define seperate volume for Elasticsearch data | |
esdata12: | |
driver: local | |
kong_data: {} | |
networks: | |
kong-net: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment