Last active
February 21, 2022 22:58
-
-
Save klanjabrik/5055feddd21b99e38bb7610c63ee238d to your computer and use it in GitHub Desktop.
DOCKER COMPOSE KONG API GATEWAY + KONGA THE GUI
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: "3.0" | |
services: | |
kong-database: | |
image: postgres:9.6 | |
restart: always | |
volumes: | |
- ./postgres-data:/var/lib/postgresql/data | |
environment: | |
- POSTGRES_USER=dbuser | |
- POSTGRES_PASSWORD=dbpassword | |
- POSTGRES_DB=kong | |
ports: | |
- 5432:5432 | |
networks: | |
- kong-net | |
kong-migrate: | |
image: kong:2.3.3 | |
restart: on-failure | |
command: kong migrations bootstrap | |
environment: | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=kong-database | |
- KONG_PG_DATABASE=kong | |
- KONG_PG_USER=dbuser | |
- KONG_PG_PASSWORD=dbpassword | |
depends_on: | |
- kong-database | |
networks: | |
- kong-net | |
kong: | |
image: kong:2.3.3 | |
restart: always | |
environment: | |
- KONG_LOG_LEVEL=debug | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=kong-database | |
- KONG_PG_DATABASE=kong | |
- KONG_PG_USER=dbuser | |
- KONG_PG_PASSWORD=dbpassword | |
- KONG_PROXY_ACCESS_LOG=/dev/stdout | |
- KONG_ADMIN_ACCESS_LOG=/dev/stdout | |
- KONG_PROXY_ERROR_LOG=/dev/stderr | |
- KONG_ADMIN_ERROR_LOG=/dev/stderr | |
- KONG_ADMIN_LISTEN=0.0.0.0:8001 | |
- KONG_PROXY_LISTEN=0.0.0.0:8000 | |
- KONG_PROXY_LISTEN_SSL=0.0.0.0:8443 | |
ports: | |
- 8000:8000 | |
- 8443:8443 | |
- 8001:8001 | |
- 8444:8444 | |
depends_on: | |
- kong-migrate | |
- kong-database | |
networks: | |
- kong-net | |
konga-prepare: | |
image: pantsel/konga:0.14.9 | |
command: "-c prepare -a postgres -u postgresql://dbuser:dbpassword@kong-database:5432/konga_db" | |
networks: | |
- kong-net | |
restart: on-failure | |
links: | |
- kong-database | |
depends_on: | |
- kong-database | |
konga: | |
image: pantsel/konga:0.14.9 | |
restart: on-failure | |
networks: | |
- kong-net | |
environment: | |
- DB_ADAPTER=postgres | |
- DB_HOST=kong-database | |
- DB_USER=dbuser | |
- DB_PASSWORD=dbpassword | |
- TOKEN_SECRET=km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb | |
- DB_DATABASE=konga_db | |
- NODE_ENV=production | |
depends_on: | |
- kong-database | |
ports: | |
- "1337:1337" | |
networks: | |
kong-net: | |
driver: bridge | |
volumes: | |
postgres-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HOW TO START
$ docker-compose up -d
HOW TO END
$ docker-compose down