Coder Social home page Coder Social logo

docker-nginx's Introduction

docker-nginx

Nginx based proxy meant to work with uwsgi upstream or proxy_pass

Codefresh build status

USAGE

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)

Variables

/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"

Options

basic auth

  • USE_AUTH=false
  • AUTH_USER=
  • AUTH_PASS=

turn on internal nginx stats

  • USE_STATS=false
  • STATS_PORT=9080

turn on OAUTH option /use in connection with external OAUTH container/

  • USE_OAUTH=false
  • OAUTH_URL=127.0.0.1
  • OAUTH_PORT=4180
  • OAUTH_NGINX_PORT=80

docker-nginx's People

Contributors

ironhalik avatar nemd avatar

Watchers

 avatar

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.