Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
/ nginx-gateway Public archive

a simple Dockerfile that maps web apps to subdomains and create subsequent nginx config files/server

Notifications You must be signed in to change notification settings

WeKeyPedia/nginx-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mechanism

When container is started:

  • it reads the etcd http API and looks for enabled subdomains within the CoreOS space
  • it creates subsequents nginx config files
  • start a simple nginx

The intent is to make every apps contained in a CoreOS host available as separed subdomains instead of the localhost + random ports logic.

example

      docker                      server                       browser

[mongodb container]
         |
[api container:3000]   <---> api.localhost:80    <------|
                                                        |
[front container:3000] <---> front.localhost:80  <---------->  client

+ dev mode:

[neo4j container:7474] <---> neo4j.localhost:80

usage

$ docker run -d -p 80:80 -e domain=localhost wekeypedia/nginx
  • -p 80:80 to bridge the nginx webserver with the host port 80
  • -e domain=localhost to setup the domain used by nginx (localhost is the default value is none is provided)

About

a simple Dockerfile that maps web apps to subdomains and create subsequent nginx config files/server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published