From 54adc979293723039ee5cf3371b962b01c8d19c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 19 Jan 2019 17:45:43 +0400 Subject: [PATCH 1/2] Update Traefik HTTP basic auth to current (not-deprecated) configurations --- README.md | 10 ++-------- docker-compose.traefik.yml | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 57768c8..0ee213f 100644 --- a/README.md +++ b/README.md @@ -83,22 +83,16 @@ export ADMIN_PASSWORD=changethis export HASHED_PASSWORD=$(openssl passwd -apr1 $ADMIN_PASSWORD) ``` -* Set and export a single variable with the username and password in "`htpasswd`" format: - -```bash -export USERNAME_PASSWORD=$ADMIN_USER:$HASHED_PASSWORD -``` - * You can check the contents with: ```bash -echo $USERNAME_PASSWORD +echo $HASHED_PASSWORD ``` it will look like: ``` -admin:$apr1$89eqM5Ro$CxaFELthUKV21DpI3UTQO. +$apr1$89eqM5Ro$CxaFELthUKV21DpI3UTQO. ``` * Create and export an environment variable `DOMAIN`, e.g.: diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index 773615e..0af3e72 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -136,7 +136,7 @@ services: - traefik.redirectorservice.frontend.redirect.entryPoint=https # Traefik service that listens to HTTPS - traefik.webservice.frontend.entryPoints=https - - traefik.frontend.auth.basic=${USERNAME_PASSWORD} + - traefik.frontend.auth.basic.users=${ADMIN_PASSWORD}:${HASHED_PASSWORD} networks: - default - net @@ -162,7 +162,7 @@ services: - traefik.redirectorservice.frontend.redirect.entryPoint=https # Traefik service that listens to HTTPS - traefik.webservice.frontend.entryPoints=https - - traefik.frontend.auth.basic=${USERNAME_PASSWORD} + - traefik.frontend.auth.basic.users=${ADMIN_PASSWORD}:${HASHED_PASSWORD} networks: - default - net @@ -230,7 +230,7 @@ services: - traefik.redirectorservice.frontend.redirect.entryPoint=https # Traefik service that listens to HTTPS - traefik.webservice.frontend.entryPoints=https - - traefik.frontend.auth.basic=${USERNAME_PASSWORD} + - traefik.frontend.auth.basic.users=${ADMIN_PASSWORD}:${HASHED_PASSWORD} networks: - default - net From 589475be3f32539f8f1d41a5cb442636d5181c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 29 Jan 2019 07:26:19 +0400 Subject: [PATCH 2/2] Update link to DockerSwarm.rocks --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ee213f..8307cf0 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Services: ## Alternative install with Traefik and HTTPS -If you have a Docker Swarm cluster with a global Traefik [set up as described in this article](https://medium.com/@tiangolo/docker-swarm-mode-and-traefik-for-a-https-cluster-20328dba6232), you can deploy Swarmprom integrated with that global Traefik proxy. +If you have a Docker Swarm cluster with a global Traefik set up as described in [DockerSwarm.rocks](https://dockerswarm.rocks), you can deploy Swarmprom integrated with that global Traefik proxy. This way, each Swarmprom service will have its own domain, and each of them will be served using HTTPS, with certificates generated (and renewed) automatically.