diff --git a/docker-compose.yml b/docker-compose.yml index 7d4fc00..8473993 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,22 +14,18 @@ services: - web labels: - "traefik.enable=true" - - "traefik.http.routers.traefik.rule=Host(`traefik.fancydictionary.com`)" - - "traefik.http.routers.traefik.service=api@internal" - - "traefik.http.routers.traefik.entrypoints=websecure" - - "traefik.http.routers.traefik.middlewares=auth" - - "traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$10$$yourhashedpassword" - - "traefik.http.routers.traefik-dashboard.rule=Host(`traefik.fancydictionary.com`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))" - - "traefik.http.routers.traefik-dashboard.service=api@internal" - - "traefik.http.routers.traefik-dashboard.entrypoints=websecure" - - "traefik.http.routers.traefik-dashboard.middlewares=auth" - - "traefik.enable=true" - - "traefik.http.routers.dashboard.rule=Host(`traefik.fancydictionary.com`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))" + + # 1. Router for the Traefik Dashboard + - "traefik.http.routers.dashboard.rule=Host(`traefik.fancydictionary.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" - "traefik.http.routers.dashboard.service=api@internal" - "traefik.http.routers.dashboard.entrypoints=websecure" + - "traefik.http.routers.dashboard.tls.certresolver=letsencrypt" # <-- Added this for SSL - "traefik.http.routers.dashboard.middlewares=auth" + + # 2. Middleware for Basic Authentication - "traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$10$$yourhashedpassword" + dictionary-app: build: context: .