zoukankan      html  css  js  c++  java
  • windows下运行konga及konga使用

    windows下运行konga及konga使用

    node运行

    1.下载代码

    git clone https://github.com/pantsel/konga.git
    cd konga
    npm i
    

    2.配置环境变量

    • 复制.env_example到.env,并将以下配置信息填入到.env中主要修改配置DB_URI
    PORT=1337
    NODE_ENV=production
    KONGA_HOOK_TIMEOUT=120000
    DB_ADAPTER=postgres
    DB_URI=postgresql://konga:konga@192.168.0.139:5432/konga
    KONGA_LOG_LEVEL=warn
    TOKEN_SECRET=some_secret_token
    

    3.运行代码

    node ./bin/konga.js  prepare --adapter postgres --uri postgresql://localhost:5432/konga
    npm run production
    

    4.开启konga配置页面

    • 打开http://localhost:1337 注册账号
    • 连接kong,即是连接kong的admin_api的地址

    docker运行

    • docker下安装比较简单,参考https://github.com/pantsel/konga#running-konga

    • docker下运行适合生产环境。

    docker run --rm pantsel/konga:latest -c prepare -a postgres -u postgresql://konga:konga@172.16.51.112:5432/konga
    
    docker run -d --restart always -p 1337:1337 
                  --network kong-net 
                  -e "TOKEN_SECRET=some_secret_token" 
                  -e "DB_ADAPTER=postgres" 
                  -e "DB_URI=postgresql://konga:konga@172.16.51.112:5432/konga" 
                  -e "NODE_ENV=production" 
                  --name konga 
                  pantsel/konga
    
  • 相关阅读:
    redis 报错随笔
    ElasticSearch restful实操 随笔
    phantomjs
    Linux环境安装安装NodeJS v10.16.3
    huawei 策略路由随笔
    eleasticsearch 安装-随笔
    cmake编译安装mysql
    postgres主从配置
    postgresql数据库部署
    redis环境部署
  • 原文地址:https://www.cnblogs.com/mbpframework/p/12891874.html
Copyright © 2011-2022 走看看