Giter VIP home page Giter VIP logo

docker-nginx-reverseproxy-domain-name's Introduction

Nginx reverse proxy demo by domain name

This is a very simple POC trying to demostrate how to integrate several containers in production and solve the right container by domain name.

The containers should have to share the folder, they are all put together here in order to demonstrate the whole thing easily.

The only trick is to share networks and hostnames in order to redirect internally (proxy) the requests to the right container.

To see the demo in action:

Start a docker machine with

docker-machine create --driver=virtualbox TEST

enter into the machine with eval $(docker-machine env TEST)

you can start containers launching ./up.sh

and down them with ./down.sh

before see how it works you need to create hosts in your /etc/hosts file, like that

192.168.99.100	one.web.dev
192.168.99.100	two.web.dev

being 192.168.99.100 the IP that the docker-machine command gave you

finally to see the results just go in the browser to:

http://one.web.dev/

and

http://two.web.dev/

docker-nginx-reverseproxy-domain-name's People

Contributors

jlaso 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.