Skip to content

Simple setup to run multiple Docker website containers using Nginx

License

Notifications You must be signed in to change notification settings

willsilvano/nginx-docker-multiple-containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Follow the next steps:

  1. Edit the /etc/hosts file and put the websites url:

    • 127.0.1.1 site1.com
    • 127.0.1.1 site2.com
    • 127.0.1.1 site3.com
  2. Execute net command to create a new Docker network:

    bash nginx/create-net.sh
    
  3. Start the nginx container:

    docker-compose -f "nginx/docker-compose.yml" up -d
    
  4. Start the websites containers:

    docker-compose -f "site1/docker-compose.yml" up -d
    
    docker-compose -f "site2/docker-compose.yml" up -d
    
    docker-compose -f "site3/docker-compose.yml" up -d
    
  5. Access the website containers:

These configurations are based on nginx-proxy Docker image.

More info https://github.com/jwilder/nginx-proxy

About

Simple setup to run multiple Docker website containers using Nginx

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published