From 8877413088dfe33c76dd8d9d42fe333a13985c12 Mon Sep 17 00:00:00 2001 From: Marco Szulik Date: Thu, 6 Jun 2024 16:18:28 +0200 Subject: [PATCH] add basic auth to root for amigor --- docker-compose.pullpreview.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.pullpreview.yml b/docker-compose.pullpreview.yml index dcd8c49..4ff2daf 100644 --- a/docker-compose.pullpreview.yml +++ b/docker-compose.pullpreview.yml @@ -73,6 +73,12 @@ services: - 'traefik.http.routers.${AMIGOR_CONTAINER_NAME:-amigor}.tls=true' - 'traefik.http.routers.${AMIGOR_CONTAINER_NAME:-amigor}.tls.certresolver=production' - 'traefik.http.routers.${AMIGOR_CONTAINER_NAME:-amigor}.priority=1' + - 'traefik.http.routers.amigor-root.rule=Host(`${PULLPREVIEW_PUBLIC_DNS}`) && Path(`/`)' + - 'traefik.http.routers.amigor-root.middlewares=htpasswd' + - 'traefik.http.routers.amigor-root.tls=true' + - 'traefik.http.routers.amigor-root.tls.certresolver=production' + - 'traefik.http.routers.amigor-root.priority=3' + - 'traefik.http.middlewares.htpasswd.basicauth.usersfile=/.htpasswd' mysql-amigor: image: 'mysql/mysql-server:8.0' container_name: ${AMIGOR_MYSQL_CONTAINER_NAME:-amigor-mysql-1} @@ -123,6 +129,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock:ro - ./storage/letsencrypt:/letsencrypt - ./storage/logs:/logs + - ./.htpasswd:/.htpasswd:ro networks: - traefik