Giter Club home page Giter Club logo

nacos-nginx-upstream's Introduction

简介

sidecar 的方式使用 nacos 动态更新Nginx upstream 实现对Nacos的服务发现.

版本要求

nacos2.x 测试通过

快速启动

配置config.toml

配置文件使用TOML进行配置

参数 描述 例子
nginx_cmd nginx命令的全路径 "/usr/sbin/nginx"
nacos_addr nacos的地址 "172.16.0.100:8848,172.16.0.101:8848,172.16.0.102:8848"
nacos_namespace nacos的namespace(Id) "xxxxxx"
nacos_group nacos的group "xxxxxx"
reload_interval nginx reload命令执行间隔时间(ms 默认值1000) 1000
nginx_config 需要修改nginx配置的路径 "/etc/nginx/nginx.conf"
nginx_upstream nginx中upstream的名字 "nacos-service"
nacos_service_name nacos服务名 对应nacos 服务列表-服务名称

启动

需要与NGINX同一机器

java -jar target/nacos-nginx-template-jar-with-dependencies.jar --config=xxx.toml

参考: https://github.com/YeautyYE/nacos-nginx-template

nacos-nginx-upstream's People

Contributors

yeautyye avatar lik0914 avatar

Stargazers

 avatar Dong Limin avatar  avatar chen kqing avatar YangEver avatar

Watchers

 avatar

nacos-nginx-upstream's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.