diff --git a/compose/traefik/traefik.yml b/compose/traefik/traefik.yml index 77cb3ba..104c3c8 100644 --- a/compose/traefik/traefik.yml +++ b/compose/traefik/traefik.yml @@ -52,12 +52,13 @@ http: # - "*.furyhawk.lol" web-secure-router: - rule: "Host(`furyhawk.lol`, `www.furyhawk.lol`, `bai.furyhawk.lol`) || PathPrefix(`/bai`)" + rule: "Host(`furyhawk.lol`, `www.furyhawk.lol`, `bai.furyhawk.lol`)" entryPoints: - web-secure middlewares: - csrf - - add-bai + - no-www + # - add-bai service: streamlit_bai_app tls: # https://docs.traefik.io/master/routing/routers/#certresolver @@ -72,7 +73,7 @@ http: - web-secure middlewares: - csrf - - add-fin + # - add-fin service: streamlit_fin_app tls: # https://docs.traefik.io/master/routing/routers/#certresolver @@ -119,7 +120,11 @@ http: # https://docs.djangoproject.com/en/dev/ref/csrf/#ajax headers: hostsProxyHeaders: ["X-CSRFToken"] - + no-www: + redirectRegex: + regex: "^https?://www\\.(.+)" + replacement: https://${1} + permanent: true add-bai: addPrefix: prefix: "/bai" @@ -143,11 +148,11 @@ http: streamlit_bai_app: loadBalancer: servers: - - url: http://streamlit_bai_app:8502/bai + - url: http://streamlit_bai_app:8502 streamlit_fin_app: loadBalancer: servers: - - url: http://streamlit_fin_app:8501/fin + - url: http://streamlit_fin_app:8501 blog: loadBalancer: servers: diff --git a/production.yml b/production.yml index 64f34bd..ddb5d99 100644 --- a/production.yml +++ b/production.yml @@ -4,12 +4,10 @@ x-environment: &default-environment LOG_LEVEL: "DEBUG" LOG_PATH: "./logs" ACME_PATH: "./acme.json" - DASHBOARD_USER: "${DASHBOARD_USER}" - DASHBOARD_PASSWORD: "${DASHBOARD_PASSWORD}" NETWORK: "${NETWORK:-web}" - FIN_LOCATION: "/fin" + FIN_LOCATION: "/" STREAMLIT_FIN_SERVER_PORT: "8501" - BAI_LOCATION: "/bai" + BAI_LOCATION: "/" STREAMLIT_BAI_SERVER_PORT: "8502" volumes: