From fefaf8108d698a634f81d6e3637da39635af6c98 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 4 Jul 2026 17:45:43 -0400 Subject: [PATCH] Fix production routing through Traefik - pass NEXT_PUBLIC_CARPLACE_URL into the production Docker build - run the production deploy script after building the image - support raw or base64 production env secrets during deploy - copy the production env file into the remote build context - include homepage in production deploy, pull, and health checks - use a stable Traefik Compose project name - reuse an existing Traefik container instead of starting a duplicate proxy - update Traefik router rules to use HeaderRegexp with traefik:latest --- docker-compose.production.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index ad471e0..54b7175 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -122,7 +122,7 @@ services: restart: unless-stopped labels: - traefik.enable=true - - traefik.http.routers.api.rule=Host(`${API_DOMAIN}`) && !HeadersRegexp(`x-middleware-subrequest`, `.+`) + - traefik.http.routers.api.rule=Host(`${API_DOMAIN}`) && !HeaderRegexp(`x-middleware-subrequest`, `.+`) - traefik.http.routers.api.entrypoints=websecure - traefik.http.routers.api.tls=true - traefik.http.routers.api.tls.certresolver=letsencrypt @@ -169,7 +169,7 @@ services: restart: unless-stopped labels: - traefik.enable=true - - traefik.http.routers.homepage.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && !HeadersRegexp(`x-middleware-subrequest`, `.+`) + - traefik.http.routers.homepage.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && !HeaderRegexp(`x-middleware-subrequest`, `.+`) - traefik.http.routers.homepage.entrypoints=websecure - traefik.http.routers.homepage.tls=true - traefik.http.routers.homepage.tls.certresolver=letsencrypt @@ -255,7 +255,7 @@ services: restart: unless-stopped labels: - traefik.enable=true - - traefik.http.routers.dashboard.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && PathPrefix(`/dashboard`) && !HeadersRegexp(`x-middleware-subrequest`, `.+`) + - traefik.http.routers.dashboard.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && PathPrefix(`/dashboard`) && !HeaderRegexp(`x-middleware-subrequest`, `.+`) - traefik.http.routers.dashboard.entrypoints=websecure - traefik.http.routers.dashboard.tls=true - traefik.http.routers.dashboard.tls.certresolver=letsencrypt @@ -298,7 +298,7 @@ services: restart: unless-stopped labels: - traefik.enable=true - - traefik.http.routers.admin.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && PathPrefix(`/admin`) && !HeadersRegexp(`x-middleware-subrequest`, `.+`) + - traefik.http.routers.admin.rule=(Host(`${PUBLIC_SITE_DOMAIN}`) || Host(`www.${PUBLIC_SITE_DOMAIN}`)) && PathPrefix(`/admin`) && !HeaderRegexp(`x-middleware-subrequest`, `.+`) - traefik.http.routers.admin.entrypoints=websecure - traefik.http.routers.admin.tls=true - traefik.http.routers.admin.tls.certresolver=letsencrypt