Last active
May 14, 2018 13:34
-
-
Save edpaget/efec75d9dfcb12f15a14e0ae627a0efd to your computer and use it in GitHub Desktop.
Kong docker-compose
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' | |
services: | |
kong-database: | |
image: postgres:9.5 | |
environment: | |
- POSTGRES_USER=kong | |
- POSTGRES_DB=kong | |
healthcheck: | |
test: ["CMD", "pg_isready", "-U", "postgres"] | |
interval: 60s | |
timeout: 5s | |
retries: 5 | |
kong-migration: | |
image: kong | |
depends_on: | |
kong-database: | |
condition: service_healthy | |
environment: | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=kong-database | |
command: kong migrations up | |
kong: | |
image: kong | |
ports: | |
- 8001:8001 | |
- 8000:8000 | |
depends_on: | |
kong-database: | |
condition: service_healthy | |
kong-migration: | |
condition: service_started | |
environment: | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=kong-database | |
- KONG_PG_DATABASE=kong | |
- KONG_ADMIN_LISTEN=0.0.0.0:8001 | |
expose: | |
- 8000 | |
- 8001 | |
healthcheck: | |
test: ["CMD-SHELL", "curl -I -s -L http://127.0.0.1:8000 || exit 1"] | |
interval: 5s | |
retries: 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment