Files
shinkan-jinkendo/.gitea/workflows/deploy-prod.yml
T
LarsandClaude Opus 5.5 36d51d4c33
Deploy Development / deploy (push) Successful in 55s
Test Suite / pytest-backend (push) Successful in 51s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 17s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m46s
Deploy production to llm-node alongside the Pi.
A separate workflow on the linux_host runner deploys main to llm-node with its own checkout, /etc/shinkan/prod.env and a compose override that mounts the NAS media without creating host paths. Media retention stays off there until it is explicitly enabled, because both installations share the media pool. The deploy only passes when /api/health/ready reports a ready database and complete schema. The Pi workflow keeps its name and label and now aborts on any other host.

Also documents both deployments and the recovery contract with the backup orchestrator.

version: 0.8.246 (backend)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:47:38 +01:00

39 lines
1.5 KiB
YAML

name: Deploy Production
# Prod-Deployment auf dem Raspberry Pi. Parallel dazu: deploy-prod-llm-node.yml.
# Namen nicht ändern: test.yml hört per workflow_run exakt auf "Deploy Production".
# Runner: Raspi5-Paperless mit einzigem Label ubuntu-latest (Host-Modus); der
# llm-node-Runner trägt dieses Label nicht. Der Guard bricht auf jedem anderen Host ab.
# Abschalten: .claude/docs/technical/PROD_DEPLOYMENTS.md
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Runner prüfen (nur Raspberry Pi)
run: |
set -e
if [ "$(hostname)" != "raspberrypi5" ] || [ "$(uname -m)" != "aarch64" ]; then
echo "✗ Falscher Runner: $(hostname)/$(uname -m), erwartet raspberrypi5/aarch64. Abbruch."
exit 1
fi
echo "✓ Runner $(hostname)/$(uname -m)"
- name: Deploy to Production
run: |
set -e
echo "=== Deploying Shinkan to PRODUCTION ==="
cd /home/lars/docker/shinkan
git fetch origin main || git clone http://192.168.2.144:3000/Lars/shinkan-jinkendo.git .
git reset --hard origin/main
docker compose build --no-cache
docker compose up -d
sleep 5
curl -sf http://localhost:8003/api/version && echo "✓ PROD API (direkt) healthy"
curl -sf http://localhost:3003/api/version && echo "✓ PROD API über Frontend-Nginx (wie Browser) healthy"
echo "=== Shinkan PROD Deploy complete ==="