Nginx based proxy meant to work with uwsgi upstream or proxy_pass
docker run -d -p 9080:80 tivix/docker-nginx
will start nginx server and server static help page
docker run -d -p 9080:80 -e "PROXY_TARGETS=target1:8080,target2:8081" -e "PROXY_LOCATIONS=/,target2" tivix/docker-nginx
will start nginx and create two location blocks:
- one for root (where forward to target1 host will be put)
- second for target2 (where forward to target2 host will be put)
/vars with default values/
- UPSTREAMS="name:url:port" (accepts multiple values /comma separated/; it also assumes that upstream is served by uwsgi)
- UPSTREAMS_LOCATIONS="/" (accepts multiple values /comma separated/; root by default; defines nginx location block for URI; order has to be equal to one from UPSTREAMS)
- UPSTREAMS_TIMEOUT=5 (default)
- UPSTREAMS_FAILS=6 (default)
- NGINX_PORT=80 (default)
- NGINX_SERVER_NAME=_ (default)
- PROXY_TARGETS="url:port" (accepts multiple values /comma separated/)
- PROXY_LOCATIONS="/" (accepts multiple values /comma separated/; root by default; defines nginx location block for URI; order has to be equal to one from PROXY_TARGETS )
- STATICS=false (hardcoded static files location to use with uwsgi/django)
- STATS=false (internal nginx_stats on/off)
- USE_AUTH=false (basic auth on/off)
- AUTH_USER="user_name"
- AUTH_PASS="password"
- USE_AUTH=false
- AUTH_USER=
- AUTH_PASS=
- USE_STATS=false
- STATS_PORT=9080
- USE_OAUTH=false
- OAUTH_URL=127.0.0.1
- OAUTH_PORT=4180
- OAUTH_NGINX_PORT=80