Skip to content

nginx proxy using multiple nginx workers to serve static files from a given directory

Notifications You must be signed in to change notification settings

TylerGauntlett/scalable_asset_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction:

  • This project uses nginx, docker and docker-compose to create multiple containers, all serving static assets.
    • This allows for horizontal scaling as the number of nginx connections increased.
  • docker-compose is used to bring up all containers in the correct order.
  • All assets in the /web directory will be served.

Usage:

Clone Repo

git clone https://github.com/TylerGauntlett/scalable_asset_server.git

Start and Build Containers

docker-compose up -d --build

Stop Containers

docker-compose down

Verify everything is working by navigating to http://localhost where the index.html will load.

Architecture:

--- proxy (port 80)
    ├── worker_1 (port 3000)
    ├── worker_2 (port 3000)
    └── worker_3 (port 3000)

Directory structure:

├── README.md
├── docker
│   └── nginx
│       ├── proxy
│       │   ├── Dockerfile
│       │   └── nginx.conf
│       └── worker
│           ├── Dockerfile
│           └── nginx.conf
├── docker-compose.yml
└── web
    └── index.html

About

nginx proxy using multiple nginx workers to serve static files from a given directory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published