{"id":19286855,"url":"https://github.com/cuyu/nginx-lb","last_synced_at":"2026-05-09T05:03:48.501Z","repository":{"id":148902024,"uuid":"84902923","full_name":"cuyu/nginx-lb","owner":"cuyu","description":"⚖ A docker image to start a load balancer (with sticky module) using Nginx","archived":false,"fork":false,"pushed_at":"2017-07-21T06:13:12.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"alpine","last_synced_at":"2025-02-23T23:16:24.575Z","etag":null,"topics":["docker-image","load-balancer","nginx","proxy"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-14T03:48:56.000Z","updated_at":"2017-07-21T02:25:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"4862e73f-6115-4726-927c-54df153bc9ef","html_url":"https://github.com/cuyu/nginx-lb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cuyu/nginx-lb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuyu%2Fnginx-lb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuyu%2Fnginx-lb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuyu%2Fnginx-lb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuyu%2Fnginx-lb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuyu","download_url":"https://codeload.github.com/cuyu/nginx-lb/tar.gz/refs/heads/alpine","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuyu%2Fnginx-lb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image","load-balancer","nginx","proxy"],"created_at":"2024-11-09T22:04:32.417Z","updated_at":"2026-05-09T05:03:48.487Z","avatar_url":"https://github.com/cuyu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## nginx-lb\n\nA docker image to start a load balancer (with [sticky](https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng) module) using Nginx.\n\n*Since we use the third-party module ([sticky](https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng)), the Nginx must be compiled from the source. To reduce the image size, we use **alpine** as basic image. The built image size is 194MB which is acceptable now.*\n\n### Getting started\n\n1. Pull the docker image:\n\n   ```\n   docker pull cuyu/nginx-lb\n   ```\n\n   **OR** you can git clone this project and build the docker image at local:\n\n   ```\n   docker build -t nginx-lb .\n   ```\n\n\n2. Create a file named `hosts`, with specific hostnames (include port) in it.\n   For example:\n\n   ```\n   example-host1:8000\n   example-host2:8000\n   example-host3:8000\n   ```\n\n3. Run the docker container:\n\n   ```\n   docker run --rm --name lb -v /YOUR_OWN_PATH/hosts:/usr/local/hosts -p 8080:80 cuyu/nginx-lb\n   ```\n\n   Then open `http://localhost:8080`, you will see the target web page.\n\n   **OR** if you want to proxy with ssl:\n\n   ```\n   docker run --rm --name lb -v /YOUR_OWN_PATH/hosts:/usr/local/hosts -p 8080:80 cuyu/nginx-lb -ssl\n   ```\n\n   Then open `https://localhost:8080`, you will see the target web page.\n\n### TODO\n\n1. ~~Support proxy https web pages (i.e. enable ssl).~~\n2. ~~Use smaller base image (maybe install g++ and wget on a basic ubuntu image).~~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuyu%2Fnginx-lb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuyu%2Fnginx-lb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuyu%2Fnginx-lb/lists"}