Last active
August 22, 2020 13:35
-
-
Save gauravarora/569c35419ad575735157398fd5ecbe7d to your computer and use it in GitHub Desktop.
kong + keycloak + konga
This file contains hidden or 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.4' | |
networks: | |
kong-net: | |
keycloak-net: | |
volumes: | |
kong-datastore: | |
driver: local | |
keycloak-datastore: | |
driver: local | |
services: | |
kong-db: | |
image: postgres:9.6 | |
volumes: | |
- kong-datastore:/var/lib/postgresql/data | |
networks: | |
- kong-net | |
ports: | |
- "15432:5432" | |
environment: | |
POSTGRES_DB: api-gw | |
POSTGRES_USER: kong | |
POSTGRES_PASSWORD: password | |
kong-migration: | |
# image: amanpreet123/kong:firsttry | |
image: gauravarora/kong:2.1.0-oidc | |
command: "kong migrations bootstrap" | |
networks: | |
- kong-net | |
restart: on-failure | |
environment: | |
KONG_DATABASE: postgres | |
KONG_PG_HOST: kong-db | |
KONG_PG_PORT: 5432 | |
KONG_PG_DATABASE: api-gw | |
KONG_PG_PASSWORD: password | |
KONG_PG_USER: kong | |
links: | |
- kong-db | |
depends_on: | |
- kong-db | |
kong: | |
# image: amanpreet123/kong:firsttry | |
image: gauravarora/kong:2.1.0-oidc | |
depends_on: | |
- kong-db | |
- keycloak | |
networks: | |
- kong-net | |
ports: | |
- "8000:8000" # Listener | |
- "8001:8001" # Admin API | |
- "8443:8443" # Listener (SSL) | |
- "8444:8444" # Admin API (SSL) | |
environment: | |
KONG_DATABASE: postgres | |
KONG_PG_HOST: kong-db | |
KONG_PG_PORT: 5432 | |
KONG_PG_DATABASE: api-gw | |
KONG_PG_PASSWORD: password | |
KONG_PG_USER: kong | |
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_PROXY_LISTEN: 0.0.0.0:8000, 0.0.0.0:8443 ssl | |
KONG_ADMIN_LISTEN: 0.0.0.0:8001, 0.0.0.0:8444 ssl | |
KONG_PLUGINS: oidc | |
keycloak-db: | |
image: postgres:9.6 | |
volumes: | |
- keycloak-datastore:/var/lib/postgresql/data | |
networks: | |
- kong-net | |
ports: | |
- "25432:5432" | |
environment: | |
POSTGRES_DB: keycloak | |
POSTGRES_USER: keycloak | |
POSTGRES_PASSWORD: password | |
keycloak: | |
image: jboss/keycloak:4.5.0.Final | |
depends_on: | |
- keycloak-db | |
networks: | |
- kong-net | |
ports: | |
- "8180:8080" | |
environment: | |
DB_VENDOR: POSTGRES | |
DB_ADDR: keycloak-db | |
DB_PORT: 5432 | |
DB_DATABASE: keycloak | |
DB_USER: keycloak | |
DB_PASSWORD: password | |
KEYCLOAK_USER: admin | |
KEYCLOAK_PASSWORD: admin | |
konga-prepare: | |
image: pantsel/konga:next | |
command: "-c prepare -a postgres -u postgresql://kong:password@kong-db:5432/konga_db" | |
environment: | |
DB_PASSWORD: password | |
networks: | |
- kong-net | |
restart: on-failure | |
links: | |
- kong-db | |
depends_on: | |
- kong-db | |
####################################### | |
# Konga: Kong GUI | |
####################################### | |
konga: | |
image: pantsel/konga:next | |
restart: always | |
networks: | |
- kong-net | |
environment: | |
DB_ADAPTER: postgres | |
DB_HOST: kong-db | |
DB_USER: kong | |
TOKEN_SECRET: km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb | |
DB_DATABASE: konga_db | |
NODE_ENV: production | |
DB_PASSWORD: password | |
depends_on: | |
- kong-db | |
- kong | |
ports: | |
- "1337:1337" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment