{"id":13558790,"url":"https://github.com/libresh/compose-haproxy","last_synced_at":"2025-04-03T13:32:00.010Z","repository":{"id":82803222,"uuid":"48372182","full_name":"libresh/compose-haproxy","owner":"libresh","description":"HAproxy for libre.sh v1","archived":false,"fork":false,"pushed_at":"2018-08-24T11:13:56.000Z","size":31,"stargazers_count":33,"open_issues_count":3,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-04T09:37:38.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libresh.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}},"created_at":"2015-12-21T13:05:05.000Z","updated_at":"2023-12-28T06:13:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d049bc93-3ceb-4c19-bb7f-5118caae81e8","html_url":"https://github.com/libresh/compose-haproxy","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/libresh%2Fcompose-haproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libresh%2Fcompose-haproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libresh%2Fcompose-haproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libresh%2Fcompose-haproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libresh","download_url":"https://codeload.github.com/libresh/compose-haproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247009715,"owners_count":20868600,"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":[],"created_at":"2024-08-01T12:05:09.407Z","updated_at":"2025-04-03T13:31:59.769Z","avatar_url":"https://github.com/libresh.png","language":"Shell","funding_links":[],"categories":["Shell","others"],"sub_categories":[],"readme":"# HAProxy\nHAProxy for IndieHosters\n\n## What is it?\n\nThis repository contains one of the most advanced and libre HAproxy for docker setup that we are aware of.\nIt ships with:\n - container discovery though docker API (like [smartstack](http://nerds.airbnb.com/smartstack-service-discovery-cloud/)) based on Env var `VIRTUAL_HOST` (Based on [docker-gen](https://github.com/jwilder/docker-gen))\n - [ocsp](https://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol)\n - [letsencrypt](https://letsencrypt.org/)\n\nEach time you add a container with the environment variable `VIRTUAL_HOST` it will:\n - generate a valid certificate (if the dns is pointing correctly)\n - serves the OCSP response\n - serves your web container with https\n\n## Prerequistes\n\n - docker\n - docker-compose\n\n## Get started\n\n```\ndocker network create lb_web\ngit clone https://github.com/indiehosters/haproxy.git\ncd haproxy\ndocker-compose up -d\n```\n\nIn these commands, we just created one network (lb_web) to isolate HAProxy with the web servers, and then, we started the containers of HAProxy and companions.\n\n```\ndocker run --network=lb_web -e VIRTUAL_HOST=example.org nginx\n```\n\nHere, we just started the most simple web server, and added to the lb_web network.\nThe only thing that HAProxy needs to see and connect to this container are the following:\n - expose a port 80\n - have a VIRTUAL_HOST variable setup with the domain name\n - be in the lb_web network\n \nAnd finally for HAProxy to be able to provision the Let's encrypt certificate, you need to configure your DNS for example.org to point to the IP of HAProxy.\n\n\n## Contributing\n\nIf you have any issue (something not working, missing doc), please do report an issue here! Thanks\n\nThis system is used in production at [IndieHosters](https://indiehosters.net/) so it is maintained. If you use it, please tell us, and we'll be really happy to update this README!\n\nYou can help us by:\n - starring this project\n - sending us a thanks email\n - reporting bugs\n - writing documentation/blog on how you got up and running in 5mins\n - writing more documentation\n - sending us cake :) We loove cake!\n\n## TODO\n\n - renewal :)\n - docker-swarm compatibility\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibresh%2Fcompose-haproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibresh%2Fcompose-haproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibresh%2Fcompose-haproxy/lists"}