1
0
Fork 0

Add examples and fix minor issues

This commit is contained in:
Joao M 2022-08-11 22:36:47 +00:00
parent c6bef882ca
commit 73ced05228
4 changed files with 56 additions and 12 deletions

View file

@ -16,9 +16,7 @@ if os.getenv("HAPROXY_PASSWORD"):
"port": os.getenv("HAPROXY_STATS_PORT") if os.getenv("HAPROXY_STATS_PORT") else "1936",
}
result["metadata"] = {
"lookup_label": os.getenv("LOOKUP_LABEL") if os.getenv("LOOKUP_LABEL") else "easyhaproxy",
}
result["lookup_label"] = os.getenv("LOOKUP_LABEL") if os.getenv("LOOKUP_LABEL") else "easyhaproxy"
cfg = HaproxyConfigGenerator(result)
print(cfg.generate(lineList))

File diff suppressed because one or more lines are too long

View file

@ -1,8 +1,17 @@
# curl -H Host:www.helloworld.com localhost:19901
# f6d8d45b7411
# 59b213cb8592
# curl -I -H Host:google.helloworld.com localhost:19901
# HTTP/1.1 301 Moved Permanently
# content-length: 0
# location: www.google.com/
version: "3"
services:
haproxy:
image: 0x0400/easy-haproxy
image: byjg/easy-haproxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
@ -28,11 +37,3 @@ services:
easyhaproxy.port.http: 19901
easyhaproxy.localport.http: 80
# curl -H Host:www.helloworld.com localhost:19901
# f6d8d45b7411
# 59b213cb8592
# curl -I -H Host:google.helloworld.com localhost:19901
# HTTP/1.1 301 Moved Permanently
# content-length: 0
# location: www.google.com/

View file

@ -1,3 +1,9 @@
# To test:
# curl -k -H "Host: host1.local" https://127.0.0.1/
#
# or add to /etc/hosts
# 127.0.0.1 host1.local
version: "3"
services: