Fix staging port binding + diagnostic ps env file
Two bugs in the staging-environments rollout: 1. Staging containers published on 127.0.0.1 are unreachable from the production Caddy container, which connects via the Docker bridge IP (host.docker.internal:host-gateway resolves to the bridge, not loopback). Bind to 0.0.0.0 instead — Hetzner Cloud firewall blocks ports 3000+ from the public internet, so it stays internal-only. 2. The trailing 'docker compose ps' diagnostic in deploy-staging / deploy-preview was missing --env-file staging.env, so compose failed env interpolation and the job exited non-zero even when the actual deploy succeeded. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
7615ecb6e7
commit
25d21161c5
2 changed files with 10 additions and 4 deletions
4
.github/workflows/cd-staging.yml
vendored
4
.github/workflows/cd-staging.yml
vendored
|
|
@ -165,7 +165,7 @@ jobs:
|
|||
# via cd-infra) are live. Idempotent.
|
||||
docker compose exec -T caddy caddy reload --config /etc/caddy/Caddyfile || true
|
||||
|
||||
docker compose -f docker-compose.staging.yml -p trails-staging ps
|
||||
docker compose -f docker-compose.staging.yml -p trails-staging --env-file staging.env --profile persistent ps
|
||||
|
||||
# ── PR preview deploy ────────────────────────────────────────────────
|
||||
deploy-preview:
|
||||
|
|
@ -303,7 +303,7 @@ jobs:
|
|||
# Reload Caddy to pick up the per-PR snippet (writes/replaces it from the SCP step)
|
||||
docker compose exec -T caddy caddy reload --config /etc/caddy/Caddyfile
|
||||
|
||||
docker compose -f docker-compose.staging.yml -p "$PROJECT" ps
|
||||
docker compose -f docker-compose.staging.yml -p "$PROJECT" --env-file staging.env ps
|
||||
|
||||
- name: Comment preview URL on PR
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue