1
0
Fork 0

Fix documentation + Letsencrypt

This commit is contained in:
Joao M 2022-09-02 19:59:59 +00:00
parent b76daa32f1
commit f8046670a9
4 changed files with 23 additions and 23 deletions

View file

@ -26,8 +26,8 @@ The container can have more than one definition.
```bash ```bash
docker run \ docker run \
-l easyhaproxy.webapi.port=80\ --label easyhaproxy.webapi.port=80\
-l easyhaproxy.webapi.host=byjg.com.br \ --label easyhaproxy.webapi.host=byjg.com.br \
.... ....
``` ```
@ -35,13 +35,13 @@ docker run \
```bash ```bash
docker run \ docker run \
-l easyhaproxy.express.port=80 \ --label easyhaproxy.express.port=80 \
-l easyhaproxy.express.localport=3000 \ --label easyhaproxy.express.localport=3000 \
-l easyhaproxy.express.host=express.byjg.com.br \ --label easyhaproxy.express.host=express.byjg.com.br \
-l easyhaproxy.admin.port=80 \ --label easyhaproxy.admin.port=80 \
-l easyhaproxy.admin.localport=3001 \ --label easyhaproxy.admin.localport=3001 \
-l easyhaproxy.admin.host=admin.byjg.com.br \ --label easyhaproxy.admin.host=admin.byjg.com.br \
.... \ .... \
some/myimage some/myimage
``` ```
@ -50,9 +50,9 @@ docker run \
```bash ```bash
docker run \ docker run \
-l easyhaproxy.express.port=80 \ --label easyhaproxy.express.port=80 \
-l easyhaproxy.express.localport=3000 \ --label easyhaproxy.express.localport=3000 \
-l easyhaproxy.express.host=express.byjg.com.br,admin.byjg.com.br \ --label easyhaproxy.express.host=express.byjg.com.br,admin.byjg.com.br \
.... \ .... \
some/myimage some/myimage
``` ```
@ -79,9 +79,9 @@ Set `easyhaproxy.[definition].mode=tcp` if your application uses TCP protocol in
```bash ```bash
docker run \ docker run \
-l easyhaproxy.example.mode=tcp \ --label easyhaproxy.example.mode=tcp \
-l easyhaproxy.example.port=3306 --label easyhaproxy.example.port=3306
-l easyhaproxy.example.localport=3306 --label easyhaproxy.example.localport=3306
.... \ .... \
some/tcp-service some/tcp-service
``` ```
@ -90,7 +90,7 @@ docker run \
```bash ```bash
docker run \ 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"}'
``` ```
---- ----

View file

@ -35,9 +35,9 @@ To make your containers "discoverable" by EasyHAProxy, that is the minimum confi
```bash ```bash
docker run -d \ docker run -d \
-e easyhaproxy.http.host=example.org \ --label easyhaproxy.http.host=example.org \
-e easyhaproxy.http.port=80 \ --label easyhaproxy.http.port=80 \
-e easyhaproxy.http.localport=8080 \ --label easyhaproxy.http.localport=8080 \
--network easyhaproxy --network easyhaproxy
my/image:tag my/image:tag
``` ```

View file

@ -15,10 +15,10 @@ Run your container:
```bash ```bash
docker run \ docker run \
-l easyhaproxy.express.port=80 \ --label easyhaproxy.express.port=80 \
-l easyhaproxy.express.localport=3000 \ --label easyhaproxy.express.localport=3000 \
-l easyhaproxy.express.host=example.org \ --label easyhaproxy.express.host=example.org \
-l easyhaproxy.express.letsencrypt=true \ --label easyhaproxy.express.letsencrypt=true \
.... \ .... \
some/myimage some/myimage
``` ```

View file

@ -226,7 +226,7 @@ class Certbot:
for item in os.listdir(letsencrypt_certs): for item in os.listdir(letsencrypt_certs):
path = os.path.join(letsencrypt_certs, item) path = os.path.join(letsencrypt_certs, item)
if os.path.isdir(path): 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")) key = Functions.load(os.path.join(path, "privkey.pem"))
filename = "%s/%s.pem" % (self.certs, item) filename = "%s/%s.pem" % (self.certs, item)
self.merge_certificate(cert, key, filename) self.merge_certificate(cert, key, filename)