Skip to content

Alpine based haproxy container with modular let's encrypt features

License

Notifications You must be signed in to change notification settings

mstipanov/lets-haproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lets-haproxy

License

Let's Encrypt certificate auto-renewal in docker-powered HAProxy reverse proxy

Running HAProxy

sudo su
cd ~
git clone https://github.com/mstipanov/lets-haproxy.git
cd lets-haproxy
mkdir local
./build.sh
./run.sh "$(pwd)/local" 80 443

Prerequisites

Existing DNS A records pointing on your public IP for: letstest.example.com and letstest2.example.com

Request certificate and add config:

sudo docker exec -it lets-haproxy /add-site.sh your.email@example.com letstest.example.com server1 www.mysite1.com:80

Renew certificates

If certificate expires in 15 days or less:

sudo docker exec -it lets-haproxy /renew-certs.sh

If certificate expires in 60 days or less:

sudo docker exec -it lets-haproxy /renew-certs.sh 60

Useful commands:

Check haproxy config

sudo docker exec -it lets-haproxy haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg

Show haproxy config

docker exec -it lets-haproxy cat /usr/local/etc/haproxy/haproxy.cfg

I've borrowed from:

About

Alpine based haproxy container with modular let's encrypt features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published