Keycloak, Kong, Konga 생성을 위한 Docker-compose.yml 예제

docker-compose.yml

version: '3.4' networks: kong-net: keycloak-net: volumes: kong-datastore: keycloak-datastore: services: kong-db: image: postgres:9.6 volumes: - kong-datastore:/var/lib/postgresql/data networks: - kong-net ports: - "15432:5432" environment: POSTGRES_DB: kongdb POSTGRES_USER: kong POSTGRES_PASSWORD: kong kong-migration: image: kong:latest command: "kong migrations bootstrap" networks: - kong-net restart: on-failure environment: KONG_PG_HOST: kong-db links: - kong-db depends_on: - kong-db kong: image: kong:latest depends_on: - kong-db networks: - kong-net ports: - "8100:8100" # Listener - "8101:8101" # Admin API - "8446:8446" # Listener (SSL) - "8445:8445" # Admin API (SSL) environment: KONG_DATABASE: postgres KONG_PG_HOST: kong-db KONG_PG_PORT: 5432 KONG_PG_DATABASE: kongdb KONG_PG_USER: kong KONG_PG_PASSWORD: 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:8100, 0.0.0.0:8446 ssl KONG_ADMIN_LISTEN: 0.0.0.0:8101, 0.0.0.0:8445 ssl konga-prepare: image: pantsel/konga:latest command: "-c prepare -a postgres -u postgresql://kong:${KONG_PG_PASSWORD:-kong}@kong-db:5432/konga" networks: - kong-net restart: on-failure depends_on: - kong-db konga: image: pantsel/konga:latest restart: always networks: - kong-net environment: DB_ADAPTER: postgres DB_URI: postgresql://kong:${KONG_PG_PASSWORD:-kong}@kong-db:5432/konga NODE_ENV: production depends_on: - kong-db ports: - "1337:1337" keycloak-db: image: postgres:9.6 volumes: - keycloak-datastore:/var/lib/postresql/data networks: - keycloak-net ports: - "25432:5432" environment: POSTGRES_DB: keycloakdb POSTGRES_USER: keycloak POSTGRES_PASSWORD: keycloak keycloak: image: jboss/keycloak:4.5.0.Final depends_on: - keycloak-db networks: - keycloak-net ports: - "8180:8080" environment: DB_VENDOR: POSTGRES DB_ADDR: keycloak-db DB_PORT: 5432 DB_DATABASE: keycloakdb DB_USER: keycloak DB_PASSWORD: keycloak KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: admin