Sign inSign up

vitovan/nginx-upsync

By vitovan

•Updated almost 7 years ago

Docker Image for nginx-upsync-module and nginx-stream-upsync-module

Image
0

2.8K

vitovan/nginx-upsync repository overview

Nginx Upsync Icon

⁠nginx-upsync

Docker Image for Nginx Upsync

Docker Image for Nginx Upsync⁠

Current Version:

This image enabled two more modules⁠ beyond Nginx Offical Mainline Alpine Image⁠:

⁠How to use

Demostration only, for more info please refer to the module repo(s).

  1. Prepare nginx-upsync.conf

    File: nginx-upsync.conf

    events { }
    
    http {
        upstream demo {
            least_conn;
            upsync 127.0.0.1:8500/v1/health/service/demo upsync_timeout=6m upsync_interval=500ms upsync_type=consul_health strong_dependency=off;
            upsync_dump_path /etc/nginx/conf.d/demo.conf;
            upsync_lb least_conn;
            include /etc/nginx/conf.d/demo.conf;
        }
    
        server {
            location = /demo {
                proxy_pass http://demo;
            }
            location = /upstream_show {
                upstream_show;
            }
        }
    }
    
  2. Prepare nginx-demo.conf

    File: nginx-demo.conf

    Bootstrap purpose only, you should replace it with your real server config

    server 127.0.0.1:9527 weight=1 max_fails=1 fail_timeout=1s;
    
  3. Run

    docker run -d --name nginx-upsync \
       -v `pwd`/nginx-upsync.conf:/etc/nginx/nginx.conf \
       -v `pwd`/nginx-demo.conf:/etc/nginx/conf.d/demo.conf \
       -p 9000:80 \
       vitovan/nginx-upsync:1.17.6
    

Tag summary

Content type

Image

Digest

Size

8.6 MB

Last updated

almost 7 years ago

docker pull vitovan/nginx-upsync