Docker Image for nginx-upsync-module and nginx-stream-upsync-module
2.8K
![]()
Docker Image for Nginx Upsync
Current Version:
This image enabled two more modules beyond Nginx Offical Mainline Alpine Image:
Demostration only, for more info please refer to the module repo(s).
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;
}
}
}
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;
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
Content type
Image
Digest
Size
8.6 MB
Last updated
almost 7 years ago
docker pull vitovan/nginx-upsync