docker-compose install Kong gateway with dashboard

First explain that the kong-dashboard 3.6 version only supports kong version 2.0 and below, so if you use the new version, there will be a connection problem.
First create the network

docker network create kong_network

Then configure the docker-compose.yml file to use the external network mode just created.

version: "3.2"
services:
  kong:
    image: kong:1.5-ubuntu
    volumes:
      - /home/docker-compose/kong/data:/data
    ports:
      - 8000:8000
      - 8443:8443
      - 8001:8001
      - 8444:8444
    environment:
      - "KONG_DATABASE=off"
      - "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, 0.0.0.0:8444 ssl"
  kong-dashboard:
    image: pgbi/kong-dashboard:v3
    ports:
      - 8080:8080
    command:
      start --kong-url http://kong:8001

networks:
  default:
     external:
       name: kong_network

start up

docker-compose up -d

stop

docker-compose stop

View log

docker-compose logs

You can use the dashboard by visiting http://127.0.0.1:8080

Guess you like

Origin blog.csdn.net/a807719447/article/details/114930255