Created
July 8, 2021 09:58
-
-
Save amithgc/613be324630ebf1dcfe80a310476034e to your computer and use it in GitHub Desktop.
Install Kong and Kong Dashboard in docker
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
#Install Postgres Database | |
docker run -d --name kong-database \ | |
-p 5432:5432 \ | |
-e "POSTGRES_USER=kong" \ | |
-e "POSTGRES_DB=kong" \ | |
-e "POSTGRES_PASSWORD=kong" \ | |
postgres:9.6 | |
# DB Migration | |
docker run --rm \ | |
--link kong-database:kong-database \ | |
-e "KONG_DATABASE=postgres" \ | |
-e "KONG_PG_HOST=kong-database" \ | |
-e "KONG_PG_USER=kong" \ | |
-e "KONG_PG_PASSWORD=kong" \ | |
-e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \ | |
kong:0.12.0 kong migrations up | |
#Install Kong 0.12.0 | |
docker run -d --name kong \ | |
--link kong-database:kong-database \ | |
-e "KONG_DATABASE=postgres" \ | |
-e "KONG_PG_HOST=kong-database" \ | |
-e "KONG_PG_PASSWORD=kong" \ | |
-e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \ | |
-e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \ | |
-e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \ | |
-e "KONG_PROXY_ERROR_LOG=/dev/stderr" \ | |
-e "KONG_ADMIN_ERROR_LOG=/dev/stderr" \ | |
-e "KONG_ADMIN_LISTEN=0.0.0.0:8001" \ | |
-p 8000:8000 \ | |
-p 8443:8443 \ | |
-p 8001:8001 \ | |
-p 8444:8444 \ | |
kong:0.12.0 | |
#Install Kong Dashboard | |
docker run -d --name kong-dashboard -p 8080:8080 pgbi/kong-dashboard:v3.3.0 \ | |
start --kong-url http://<ipaddress>:8001 --basic-auth admin=password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment