From 53cf1837b202527fe2f2b2ad45418c0967eb0083 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 16 May 2026 00:21:53 +0200 Subject: [PATCH] =?UTF-8?q?fix(obs):=20set=20POSTGRES=5FHOST=20per=20envir?= =?UTF-8?q?onment=20=E2=80=94=20staging/prod=20use=20compose=20auto-names?= =?UTF-8?q?=20not=20archive-db?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/nightly.yml | 1 + .gitea/workflows/release.yml | 1 + infra/observability/obs.env | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/nightly.yml b/.gitea/workflows/nightly.yml index ce45d991..50219afc 100644 --- a/.gitea/workflows/nightly.yml +++ b/.gitea/workflows/nightly.yml @@ -144,6 +144,7 @@ jobs: GLITCHTIP_SECRET_KEY=${{ secrets.GLITCHTIP_SECRET_KEY }} POSTGRES_USER=archiv POSTGRES_PASSWORD=${{ secrets.STAGING_POSTGRES_PASSWORD }} + POSTGRES_HOST=archiv-staging-db-1 EOF - name: Validate observability compose config diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bd22cb63..48d61147 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -112,6 +112,7 @@ jobs: GLITCHTIP_SECRET_KEY=${{ secrets.GLITCHTIP_SECRET_KEY }} POSTGRES_USER=archiv POSTGRES_PASSWORD=${{ secrets.PROD_POSTGRES_PASSWORD }} + POSTGRES_HOST=archiv-production-db-1 EOF - name: Start observability stack diff --git a/infra/observability/obs.env b/infra/observability/obs.env index 8200b235..ace1da3a 100644 --- a/infra/observability/obs.env +++ b/infra/observability/obs.env @@ -15,6 +15,8 @@ GF_SERVER_ROOT_URL=https://grafana.archiv.raddatz.cloud GLITCHTIP_DOMAIN=https://glitchtip.archiv.raddatz.cloud # PostgreSQL hostname for GlitchTip db-init and workers. -# archive-db is the production default (full stack running). -# Override in obs-secrets.env when a different stack is active. -POSTGRES_HOST=archive-db +# The actual value depends on the Compose project name — it is not a fixed string. +# CI sets POSTGRES_HOST in obs-secrets.env per environment: +# staging: archiv-staging-db-1 (project archiv-staging + service db) +# production: archiv-production-db-1 (project archiv-production + service db) +# For local dev, set POSTGRES_HOST in your .env file (defaults to archive-db there).