Fix production deploy Traefik reuse
Build & Push / Build & Push Docker Image (push) Successful in 53s

- 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
This commit is contained in:
root
2026-07-04 17:39:22 -04:00
parent 7f51825b1f
commit 9e096f0216
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -503,6 +503,13 @@ start_traefik() {
ensure_env_file
ensure_traefik_network
render_registry_proxy_config
local existing_proxy
existing_proxy="$(docker ps --filter publish=80 --format '{{.ID}} {{.Image}} {{.Names}}' | awk 'tolower($0) ~ /traefik/ { print $1; exit }')"
if [[ -n "${existing_proxy}" ]]; then
echo "Using existing Traefik container ${existing_proxy}; skipping duplicate Traefik startup."
docker network connect "${TRAEFIK_NETWORK}" "${existing_proxy}" 2>/dev/null || true
return 0
fi
traefik_compose up -d
}