Merge pull request #358 from trails-cool/stigi/staging-port-fix
Move persistent staging off port 3100 to avoid Loki conflict
This commit is contained in:
commit
32ff7c81ec
2 changed files with 13 additions and 6 deletions
15
.github/workflows/cd-staging.yml
vendored
15
.github/workflows/cd-staging.yml
vendored
|
|
@ -12,6 +12,10 @@ on:
|
|||
- "apps/**"
|
||||
- "packages/**"
|
||||
- "pnpm-lock.yaml"
|
||||
# Also redeploy when the staging plumbing itself changes, so a port
|
||||
# bump or compose edit doesn't sit unapplied until the next apps/ push.
|
||||
- "infrastructure/docker-compose.staging.yml"
|
||||
- ".github/workflows/cd-staging.yml"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, closed]
|
||||
paths:
|
||||
|
|
@ -88,10 +92,10 @@ jobs:
|
|||
secrets: |
|
||||
SENTRY_AUTH_TOKEN=/tmp/sentry_token
|
||||
|
||||
# ── Deploy persistent staging (main push) ────────────────────────────
|
||||
# ── Deploy persistent staging (main push or manual dispatch) ─────────
|
||||
deploy-staging:
|
||||
name: Deploy Staging
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
|
||||
needs: [build-images]
|
||||
runs-on: ubuntu-latest
|
||||
environment: production
|
||||
|
|
@ -106,8 +110,11 @@ jobs:
|
|||
{
|
||||
echo "DOMAIN=staging.trails.cool"
|
||||
echo "STAGING_DATABASE=trails_staging"
|
||||
echo "JOURNAL_HOST_PORT=3100"
|
||||
echo "PLANNER_HOST_PORT=3101"
|
||||
# Loki binds 10.0.0.2:3100 on the vSwitch interface, so the
|
||||
# staging stack can't share 3100 — see CLAUDE.md "Staging &
|
||||
# Previews" port table.
|
||||
echo "JOURNAL_HOST_PORT=3110"
|
||||
echo "PLANNER_HOST_PORT=3111"
|
||||
echo "JOURNAL_IMAGE_TAG=staging"
|
||||
echo "PLANNER_IMAGE_TAG=staging"
|
||||
echo "SENTRY_RELEASE=${{ github.sha }}"
|
||||
|
|
|
|||
|
|
@ -229,8 +229,8 @@ A persistent staging stack and ephemeral PR previews share the flagship server w
|
|||
|
||||
PR previews are **journal-only** — their `PLANNER_URL` points at the persistent staging planner so we don't pay 256MB per preview for an extra planner. The persistent staging planner's CSP allows `connect-src wss://*.staging.trails.cool` so PR-preview journals can talk to it.
|
||||
|
||||
**Port scheme** (host's loopback, reverse-proxied by Caddy via `host.docker.internal`):
|
||||
- Persistent staging: journal `3100`, planner `3101`
|
||||
**Port scheme** (host-published, reverse-proxied by Caddy via `host.docker.internal`):
|
||||
- Persistent staging: journal `3110`, planner `3111` (3100 collides with Loki on the vSwitch interface)
|
||||
- PR `<N>` preview: journal `3200 + 2N`, planner `3201 + 2N` (planner unused for previews)
|
||||
|
||||
**Compose project namespacing** keeps each preview isolated:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue