Created
April 14, 2024 12:31
-
-
Save mehuled/cefcb5c48557adc14b2cd6c7c7d06ace to your computer and use it in GitHub Desktop.
simple docker-compose to run kong locally
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
services: | |
postgres: | |
image: postgres:13 | |
restart: always | |
environment: | |
POSTGRES_USER: kong | |
POSTGRES_PASSWORD: kong | |
POSTGRES_DB: kong | |
ports: | |
- "5432:5432" | |
kong-migrations-bootstrap: | |
build: | |
context: ./ | |
dockerfile: Dockerfile | |
container_name: kong-migrations-bootstrap | |
environment: | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=postgres | |
- KONG_PG_USER=kong | |
- KONG_PG_PASSWORD=kong | |
- KONG_PG_DATABASE=kong | |
external_links: | |
- postgres | |
command: kong migrations bootstrap | |
kong: | |
build: | |
context: ./ | |
dockerfile: Dockerfile | |
ports: | |
- "8000:8000" | |
- "8001:8001" | |
- "8443:8443" | |
- "9966:9966" | |
external_links: | |
- postgres | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:8001"] | |
interval: 10s | |
timeout: 5s | |
retries: 10 | |
restart: on-failure | |
environment: | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=postgres | |
- KONG_PG_USER=kong | |
- KONG_PG_PASSWORD=kong | |
- KONG_PG_DATABASE=kong | |
- KONG_ADMIN_LISTEN=0.0.0.0:8001 | |
depends_on: | |
- kong-migrations-bootstrap | |
networks: | |
default: | |
name: kong |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment