refactor: use inline basicauth for Traefik dashboard

Changed dashboard authentication to use inline basicauth
like Scrapy instead of external .htpasswd file:

**Changes:**
- Updated proxy labels to use basicauth.users=${PROXY_AUTH_USERS}
- Removed .htpasswd file and auth directory
- Removed dashboard-auth middleware from security.yaml
- Removed .htpasswd volume mount from compose.yaml

**Benefits:**
- Consistent with Scrapy authentication pattern
- Simpler configuration (no external files)
- Auth credentials managed centrally via .env

Dashboard accessible at: https://proxy.pivoine.art
Credentials: valknar / ragnarok98 (via PROXY_AUTH_USERS)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-06 08:35:43 +01:00
parent ec76db69ed
commit d3850e559a
3 changed files with 2 additions and 8 deletions

View File

@@ -1 +0,0 @@
valknar:$apr1$mPI9lhER$CIz4BtA8cQULi4McVZxfz.

View File

@@ -61,7 +61,6 @@ services:
- letsencrypt_data:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./dynamic:/etc/traefik/dynamic:ro
- ./auth/.htpasswd:/etc/traefik/.htpasswd:ro
labels:
- 'traefik.enable=true'
@@ -70,7 +69,8 @@ services:
- 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.entrypoints=web-secure'
- 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.tls.certresolver=resolver'
- 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.service=api@internal'
- 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.middlewares=dashboard-auth@file'
- 'traefik.http.middlewares.${PROXY_COMPOSE_PROJECT_NAME}-dashboard-auth.basicauth.users=${PROXY_AUTH_USERS}'
- 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.middlewares=${PROXY_COMPOSE_PROJECT_NAME}-dashboard-auth'
volumes:
letsencrypt_data:
name: ${PROXY_COMPOSE_PROJECT_NAME}_letsencrypt_data

View File

@@ -59,8 +59,3 @@ http:
average: 30
burst: 15
period: 1s
# Basic Auth for Traefik Dashboard
dashboard-auth:
basicAuth:
usersFile: /etc/traefik/.htpasswd