konga 安装部署

Kong的功能已经足够强大,它的免费版是没有提供GUI界面的,通过CLI使用始终相对不便。于是,网上一些有志之士开发了相关的GUI界面。其中,做得比较好的有:

Kong dashboard,https://github.com/PGBI/kong-dashboard,已经长期没有更新,只支持到Kong的0.9版本,目前Kong的最新版本是1.2.x
Konga,https://github.com/pantsel/konga,功能完善,持续更新中

官网:https://github.com/pantsel/konga

konga 是kong的UI管理界面,下面用docker 安装

# 拉去镜像
docker pull pantsel/konga:latest

# 导出镜像
docker save -o ./konga.tar pantsel/konga:latest

# 内网导入镜像
docker load --input ./konga.tar
1.Prepare the database

docker run --rm pantsel/konga:latest -c prepare -a postgres 
-u postgresql://konga:123456@localhost:5431/konga


# 注意 上面的localhost是docker 容器的localhost,并不是宿主机的localhost
# 一般需要行为:172.17.0.1

在docker容器里localhost并不是指宿主机的localhost
由此原因,并不能在容器中通过localhost:3306访问到宿主机的mysql

docker在运行时就建立了虚拟网卡,并命名为docker0
我们可以在宿主机上运行ifconfig看到它,这就是宿主机建立的网桥,用于与各个容器之间通信

 

2.Start Konga

docker run -p 1337:1337 -e "TOKEN_SECRET={{somerandomstring}}" -e "DB_ADAPTER=postgres" -e 
"DB_URI=postgresql://konga:123456@localhost:5431/konga" -e "NODE_ENV=production" 
--name konga pantsel/konga

 

3.访问:http://localhost:1337

 

4.需要填写用户名、email、密码等等进行注册(内部网也需要)

 

如果出现报错:

error: A hook (`orm`) failed to load!
error: Failed to prepare database: error: column r.consrc does not exist

问题原因是:高版本postgresql导致的,后来换回9.6就可以了

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章