From 33a36546d27f0c8dc8a34903caea5432878a5982 Mon Sep 17 00:00:00 2001 From: dimitar Date: Tue, 4 Aug 2026 06:43:07 +0200 Subject: [PATCH] traefic fix --- docker-compose.yaml | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 081ff3a..0815cb8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,14 +9,39 @@ services: networks: - coolify labels: - - traefik.enable=true - - traefik.http.routers.spomeniqr-wildcard.rule=HostRegexp(`^[a-z0-9-]+\.testbed\.mk$$`) - - traefik.http.routers.spomeniqr-wildcard.entryPoints=http,https - - traefik.http.routers.spomeniqr-wildcard.service=spomeniqr-svc - - traefik.http.routers.spomeniqr-wildcard.tls=true - - traefik.http.services.spomeniqr-svc.loadbalancer.server.port=3000 - - traefik.docker.network=coolify +traefik.enable: "true" +traefik.docker.network: "coolify" +# Root domain: testbed.mk +traefik.http.routers.testbed-root.rule: "Host(`testbed.mk`)" +traefik.http.routers.testbed-root.entryPoints: "https" +traefik.http.routers.testbed-root.service: "spomeniqr-svc" +traefik.http.routers.testbed-root.tls: "true" + +# Wildcard subdomains: *.testbed.mk +traefik.http.routers.testbed-wildcard.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.testbed.mk`)" +traefik.http.routers.testbed-wildcard.entryPoints: "https" +traefik.http.routers.testbed-wildcard.service: "spomeniqr-svc" +traefik.http.routers.testbed-wildcard.tls: "true" + +# HTTP → HTTPS redirect for root +traefik.http.routers.testbed-root-http.rule: "Host(`testbed.mk`)" +traefik.http.routers.testbed-root-http.entryPoints: "http" +traefik.http.routers.testbed-root-http.middlewares: "redirect-to-https" +traefik.http.routers.testbed-root-http.service: "spomeniqr-svc" + +# HTTP → HTTPS redirect for wildcard +traefik.http.routers.testbed-wildcard-http.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.testbed.mk`)" +traefik.http.routers.testbed-wildcard-http.entryPoints: "http" +traefik.http.routers.testbed-wildcard-http.middlewares: "redirect-to-https" +traefik.http.routers.testbed-wildcard-http.service: "spomeniqr-svc" + +# Your app service +traefik.http.services.spomeniqr-svc.loadbalancer.server.port: "3000" + +# Gzip compression +traefik.http.middlewares.gzip.compress: "true" +traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: "https" networks: coolify: external: true