From f8046670a99c7a1196c11ee3b42681e5d6a37021 Mon Sep 17 00:00:00 2001 From: Joao M Date: Fri, 2 Sep 2022 19:59:59 +0000 Subject: [PATCH] Fix documentation + Letsencrypt --- docs/container-labels.md | 30 +++++++++++++++--------------- docs/docker.md | 6 +++--- docs/letsencrypt.md | 8 ++++---- src/functions/__init__.py | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/container-labels.md b/docs/container-labels.md index 384542b..b71cecb 100644 --- a/docs/container-labels.md +++ b/docs/container-labels.md @@ -26,8 +26,8 @@ The container can have more than one definition. ```bash docker run \ - -l easyhaproxy.webapi.port=80\ - -l easyhaproxy.webapi.host=byjg.com.br \ + --label easyhaproxy.webapi.port=80\ + --label easyhaproxy.webapi.host=byjg.com.br \ .... ``` @@ -35,13 +35,13 @@ docker run \ ```bash docker run \ - -l easyhaproxy.express.port=80 \ - -l easyhaproxy.express.localport=3000 \ - -l easyhaproxy.express.host=express.byjg.com.br \ + --label easyhaproxy.express.port=80 \ + --label easyhaproxy.express.localport=3000 \ + --label easyhaproxy.express.host=express.byjg.com.br \ - -l easyhaproxy.admin.port=80 \ - -l easyhaproxy.admin.localport=3001 \ - -l easyhaproxy.admin.host=admin.byjg.com.br \ + --label easyhaproxy.admin.port=80 \ + --label easyhaproxy.admin.localport=3001 \ + --label easyhaproxy.admin.host=admin.byjg.com.br \ .... \ some/myimage ``` @@ -50,9 +50,9 @@ docker run \ ```bash docker run \ - -l easyhaproxy.express.port=80 \ - -l easyhaproxy.express.localport=3000 \ - -l easyhaproxy.express.host=express.byjg.com.br,admin.byjg.com.br \ + --label easyhaproxy.express.port=80 \ + --label easyhaproxy.express.localport=3000 \ + --label easyhaproxy.express.host=express.byjg.com.br,admin.byjg.com.br \ .... \ some/myimage ``` @@ -79,9 +79,9 @@ Set `easyhaproxy.[definition].mode=tcp` if your application uses TCP protocol in ```bash docker run \ - -l easyhaproxy.example.mode=tcp \ - -l easyhaproxy.example.port=3306 - -l easyhaproxy.example.localport=3306 + --label easyhaproxy.example.mode=tcp \ + --label easyhaproxy.example.port=3306 + --label easyhaproxy.example.localport=3306 .... \ some/tcp-service ``` @@ -90,7 +90,7 @@ docker run \ ```bash docker run \ - -l easyhaproxy.[definition].redirect='{"www.byjg.com.br":"http://byjg.com.br","byjg.com":"http://byjg.com.br"}' + --label easyhaproxy.[definition].redirect='{"www.byjg.com.br":"http://byjg.com.br","byjg.com":"http://byjg.com.br"}' ``` ---- diff --git a/docs/docker.md b/docs/docker.md index 0ea1950..c777b35 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -35,9 +35,9 @@ To make your containers "discoverable" by EasyHAProxy, that is the minimum confi ```bash docker run -d \ - -e easyhaproxy.http.host=example.org \ - -e easyhaproxy.http.port=80 \ - -e easyhaproxy.http.localport=8080 \ + --label easyhaproxy.http.host=example.org \ + --label easyhaproxy.http.port=80 \ + --label easyhaproxy.http.localport=8080 \ --network easyhaproxy my/image:tag ``` diff --git a/docs/letsencrypt.md b/docs/letsencrypt.md index 7b83c77..0e8c86b 100644 --- a/docs/letsencrypt.md +++ b/docs/letsencrypt.md @@ -15,10 +15,10 @@ Run your container: ```bash docker run \ - -l easyhaproxy.express.port=80 \ - -l easyhaproxy.express.localport=3000 \ - -l easyhaproxy.express.host=example.org \ - -l easyhaproxy.express.letsencrypt=true \ + --label easyhaproxy.express.port=80 \ + --label easyhaproxy.express.localport=3000 \ + --label easyhaproxy.express.host=example.org \ + --label easyhaproxy.express.letsencrypt=true \ .... \ some/myimage ``` diff --git a/src/functions/__init__.py b/src/functions/__init__.py index 4267f73..b80e181 100644 --- a/src/functions/__init__.py +++ b/src/functions/__init__.py @@ -226,7 +226,7 @@ class Certbot: for item in os.listdir(letsencrypt_certs): path = os.path.join(letsencrypt_certs, item) if os.path.isdir(path): - cert = Functions.load(os.path.join(path, "fullchain.pem")) + cert = Functions.load(os.path.join(path, "cert.pem")) key = Functions.load(os.path.join(path, "privkey.pem")) filename = "%s/%s.pem" % (self.certs, item) self.merge_certificate(cert, key, filename)