Git Product home page Git Product logo

openresty's Introduction

Build Status Docker Hub

3Blades Reverse Proxy

Overview

This repo offers an opinionated OpenResty setup to work with 3Blades stack.

This configuration depends on upstream app server, notifications server and logspout.

Run as docker container

docker service create \
  --replicas 1 \
  --publish 8080:80 \
  --publish :443 \
  -e PATH="/usr/local/openresty/nginx/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
  -e REDIS_URL="redis://redis:6379/0" \
  --constraint 'node.labels.type == proxy' \
  --name openresty \
  --network threeblades \
  3blades/openresty:build-64 \
  -p '' -c nginx.conf -g 'daemon off;'

Notes:

  • Make sure you use a valid endpoint for REDIS_URL environment variable.
  • constraint is optional. This would allow you to launch OpenResty only on dedicated nodes.
  • Name can be of your choosing.
  • Network name is optional with single host set up (usually done with docker-compose), but necessary for multi host docker setup. Network name can be of your choosing, but would have to be the same network as one launched with upstream servers, otherwise name resolution would not work.
  • You could launch this version of OpenResty on hosts (either as docker containers or natively) that point to internal load balancers which in turn balance traffic to internal app server.
  • Proxy needs traffic permissions to allow direct connectivity to user server containers.
  • You could comment out ADD nginx.conf /etc/nginx.conf and run countainer using a volume mount to point to nginx.conf on host with the docker run -v ... option.

openresty's People

Contributors

jgwerner avatar machinesareus avatar netoisc avatar

Watchers

 avatar  avatar

Forkers

jkp85

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.