Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.
/ docker-haproxy Public archive

[DEPRECATED] haproxy container with letsencrypt support

Notifications You must be signed in to change notification settings

zaggash/docker-haproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

Based on linuxserver.io baseimage but NOT SUPPORTED by them.

zaggash/docker-haproxy

[hub]: https://hub.docker.com/r/zaggash/docker-haproxy/

The Reliable, High Performance TCP/HTTP Load Balancer. haproxy This container have LetsEncrypt support for multiple domain.

haproxy

Usage

docker create --name=haproxy \
-v <path to data>:/config \
-e TZ \
-e PGID=<gid> -e PUID=<uid> \
-e DOMAINS=<domain.name...> \
-e EMAIL=<email>
-p 80:80 \
-p 443:443 \
zaggash/docker-haproxy

Parameters

  • -p 80
  • -p 443 - the port(s)
  • -v /config - where it should store config files and logs
  • -e PGID for GroupID - see below for explanation
  • -e PUID for UserID - see below for explanation
  • -e TZ for timezone information
  • -e DOMAINS - domain to ask for a certificate, see below for more information
  • -e EMAIL - your email for the letsencrypt account

It is based on alpine linux with s6 overlay, for shell access whilst the container is running do docker exec -it haproxy /bin/bash.

User / Group Identifiers

Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.

Setting up the application

You can edit the config in /config/haproxy.cfg There is default configuration which is working with an default auto-generated certificate.

In order to generate letsencrypt certificate, follow the rules :

Each domain seperated by a coma (,) will be have its own certificate. If you add multiple domain sperated by a space between the coma (,) all these domains will be on a single certificate, the certificate name will be the shortest domain name of the group

DOMAINS="blah.domain.fr domains.fr, www.dom.com, blahblah.domdom.net www.domdom.net"

Info

  • To monitor the logs of the container in realtime docker logs -f haproxy.

About

[DEPRECATED] haproxy container with letsencrypt support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages