devops(observability): wire observability stack into nightly and release deploys
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 4m32s
CI / OCR Service Tests (pull_request) Successful in 17s
CI / Backend Unit Tests (pull_request) Successful in 4m3s
CI / fail2ban Regex (pull_request) Successful in 1m55s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m42s
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 4m32s
CI / OCR Service Tests (pull_request) Successful in 17s
CI / Backend Unit Tests (pull_request) Successful in 4m3s
CI / fail2ban Regex (pull_request) Successful in 1m55s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m42s
- docker-compose.prod.yml: add `name: archiv-net` so the network has a stable Docker name regardless of compose project name (-p flag). Both staging and production share the same host-level network, which is correct since the observability stack is a single shared instance. - nightly.yml / release.yml: add observability env vars (POSTGRES_USER, PORT_GRAFANA=3003, PORT_GLITCHTIP=3002, PORT_PROMETHEUS=9090, GRAFANA_ADMIN_PASSWORD, GLITCHTIP_SECRET_KEY, GLITCHTIP_DOMAIN) to the env file, then `docker compose -f docker-compose.observability.yml up -d` after the app deploy step. PORT_GRAFANA=3003 avoids collision with staging frontend on 3001. Requires two new Gitea secrets: GRAFANA_ADMIN_PASSWORD, GLITCHTIP_SECRET_KEY. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,13 @@ jobs:
|
|||||||
MAIL_STARTTLS_ENABLE=false
|
MAIL_STARTTLS_ENABLE=false
|
||||||
APP_MAIL_FROM=noreply@staging.raddatz.cloud
|
APP_MAIL_FROM=noreply@staging.raddatz.cloud
|
||||||
IMPORT_HOST_DIR=/srv/familienarchiv-staging/import
|
IMPORT_HOST_DIR=/srv/familienarchiv-staging/import
|
||||||
|
POSTGRES_USER=archiv
|
||||||
|
PORT_GRAFANA=3003
|
||||||
|
PORT_GLITCHTIP=3002
|
||||||
|
PORT_PROMETHEUS=9090
|
||||||
|
GRAFANA_ADMIN_PASSWORD=${{ secrets.GRAFANA_ADMIN_PASSWORD }}
|
||||||
|
GLITCHTIP_SECRET_KEY=${{ secrets.GLITCHTIP_SECRET_KEY }}
|
||||||
|
GLITCHTIP_DOMAIN=https://glitchtip.archiv.raddatz.cloud
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Verify backend /import:ro mount is wired
|
- name: Verify backend /import:ro mount is wired
|
||||||
@@ -120,6 +127,13 @@ jobs:
|
|||||||
--profile staging \
|
--profile staging \
|
||||||
up -d --wait --remove-orphans
|
up -d --wait --remove-orphans
|
||||||
|
|
||||||
|
- name: Start observability stack
|
||||||
|
run: |
|
||||||
|
docker compose \
|
||||||
|
-f docker-compose.observability.yml \
|
||||||
|
--env-file .env.staging \
|
||||||
|
up -d
|
||||||
|
|
||||||
- name: Reload Caddy
|
- name: Reload Caddy
|
||||||
# Apply any committed Caddyfile changes before smoke-testing the
|
# Apply any committed Caddyfile changes before smoke-testing the
|
||||||
# public surface. Without this step, a Caddyfile edit lands in the
|
# public surface. Without this step, a Caddyfile edit lands in the
|
||||||
|
|||||||
@@ -72,6 +72,13 @@ jobs:
|
|||||||
MAIL_STARTTLS_ENABLE=true
|
MAIL_STARTTLS_ENABLE=true
|
||||||
APP_MAIL_FROM=noreply@raddatz.cloud
|
APP_MAIL_FROM=noreply@raddatz.cloud
|
||||||
IMPORT_HOST_DIR=/srv/familienarchiv-production/import
|
IMPORT_HOST_DIR=/srv/familienarchiv-production/import
|
||||||
|
POSTGRES_USER=archiv
|
||||||
|
PORT_GRAFANA=3003
|
||||||
|
PORT_GLITCHTIP=3002
|
||||||
|
PORT_PROMETHEUS=9090
|
||||||
|
GRAFANA_ADMIN_PASSWORD=${{ secrets.GRAFANA_ADMIN_PASSWORD }}
|
||||||
|
GLITCHTIP_SECRET_KEY=${{ secrets.GLITCHTIP_SECRET_KEY }}
|
||||||
|
GLITCHTIP_DOMAIN=https://glitchtip.archiv.raddatz.cloud
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Build images
|
- name: Build images
|
||||||
@@ -93,6 +100,13 @@ jobs:
|
|||||||
--env-file .env.production \
|
--env-file .env.production \
|
||||||
up -d --wait --remove-orphans
|
up -d --wait --remove-orphans
|
||||||
|
|
||||||
|
- name: Start observability stack
|
||||||
|
run: |
|
||||||
|
docker compose \
|
||||||
|
-f docker-compose.observability.yml \
|
||||||
|
--env-file .env.production \
|
||||||
|
up -d
|
||||||
|
|
||||||
- name: Reload Caddy
|
- name: Reload Caddy
|
||||||
# See nightly.yml — same rationale and mechanism: DooD job containers
|
# See nightly.yml — same rationale and mechanism: DooD job containers
|
||||||
# cannot call systemctl directly; nsenter via a privileged sibling
|
# cannot call systemctl directly; nsenter via a privileged sibling
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
networks:
|
networks:
|
||||||
archiv-net:
|
archiv-net:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
name: archiv-net
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user