Add Konga

Kong itself doesn’t provide a user interface to access the Admin API. Luckily the Konga project does exactly this as an open source project.

Konga comes with its own database schema which can be added to our existing PostgreSQL instance. The mechanism is similar to the one used for Kong. A container needs to be started with a special command to initialize the database.

  konga-migration:
    container_name: konga-migration
    image: pantsel/konga:latest
    depends_on:
      - "kong-database"
    restart: on-failure
    networks:
      - kong-rover-demo
    command: "-c prepare -a postgres -u postgresql://kong@kong-database:5432/konga_db"

  konga:
    container_name: konga
    image: pantsel/konga:latest
    depends_on:
      - "kong-database"
      - "konga-migration"
    restart: always
    networks:
      - kong-rover-demo
    environment:
      - DB_ADAPTER=postgres
      - DB_HOST=kong-database
      - DB_USER=kong
      - DB_DATABASE=konga_db
      - NODE_ENV=production
      - TOKEN_SECRET=j4ixi4WxP8MJq5xJni4U