{"id":24012891,"url":"https://github.com/glassechidna/doxyproxy","last_synced_at":"2026-05-04T17:36:31.806Z","repository":{"id":84300226,"uuid":"86761552","full_name":"glassechidna/doxyproxy","owner":"glassechidna","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-01T00:42:13.000Z","size":6,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-08T06:26:45.094Z","etag":null,"topics":["docker","ec2-container-service","lua","nginx","openresty","proxy"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/glassechidna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-31T00:29:04.000Z","updated_at":"2017-03-31T01:37:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee0efbd4-4464-4780-a232-d4eeff2ffdd1","html_url":"https://github.com/glassechidna/doxyproxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassechidna%2Fdoxyproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassechidna%2Fdoxyproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassechidna%2Fdoxyproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glassechidna%2Fdoxyproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glassechidna","download_url":"https://codeload.github.com/glassechidna/doxyproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240698514,"owners_count":19843408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","ec2-container-service","lua","nginx","openresty","proxy"],"created_at":"2025-01-08T06:22:50.116Z","updated_at":"2026-05-04T17:36:26.788Z","avatar_url":"https://github.com/glassechidna.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doxyproxy \n## Dynamic reverse proxy for Docker containers\n\nHosting multiple sites on a single server is nothing new - it's as old as\nthe web itself. nginx already supports this use case, but an `nginx.conf`\nfile needs to be updated and nginx itself reloaded whenever a config change\n(e.g. backend server IP address, listening domain name) happens. \n\nThis is problematic when using Docker containers as backend servers because \ntypically Docker containers have dynamically assigned IP addresses. `doxyproxy`\nsolves this by looking up backend server containers' IP addresses _on-demand_\ninside the nginx process itself. This is achieved using OpenResty. \n\n## Usage\n\n### Example\n\n```\ndocker run -d \\\n  --label com.glassechidna.doxyproxy.HttpHost=example.com \\\n  --label com.glassechidna.doxyproxy.HttpPort=80 \\\n  nginx\n\ndocker run -d \\\n  --label com.glassechidna.doxyproxy.HttpHost=example2.com \\\n  --label com.glassechidna.doxyproxy.HttpPort=80 \\\n  nginx\n\ndocker run -d --net=host -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 glassechidna/doxyproxy\ncurl -H 'Host: example.com' http://localhost:8080/ # forwarded to the first container\ncurl -H 'Host: example2.com' http://localhost:8080/ # forwarded to the second container\n```\n\n`doxyproxy` determines the container to forward traffic to by looking for a\ncontainer with a matching `com.glassechidna.doxyproxy.HttpHost` label. `doxyproxy`\nthen uses the `com.glassechidna.doxyproxy.HttpPort` label to know which port\nthe web traffic should be forwarded to in that container.\n\n**Note**: In the above example the `--net=host` networking mode command is not\nstrictly necessary as the three containers are launched into the same default\nDocker bridge network and hence the `doxyproxy` container has connectivity to\nthe other two. Where the host network mode _does_ become necessary is when you\nwish to forward traffic to containers in _other_ Docker networks.\n\n## Credit\n\nThis project is originally based on the great work done by [`sourcelair/ceryx`][ceryx].\n\n[ceryx]: https://github.com/sourcelair/ceryx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglassechidna%2Fdoxyproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglassechidna%2Fdoxyproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglassechidna%2Fdoxyproxy/lists"}