Add Gitea CI/CD pipeline and shared infra setup

- docker-compose.yml: remove bundled postgres, connect to shared
  postgres via host-gateway:5433, add uploads volume, configurable port
- .gitea/workflows/deploy.yml: Gitea Actions workflow for automated
  deploy on push to main
- infra/README.md: step-by-step setup guide for NAS deployment
  (shared postgres, pgAdmin, act_runner, Gitea secrets)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-04-07 15:42:58 +02:00
parent b865e5a283
commit 257d1e4062
3 changed files with 232 additions and 22 deletions

View File

@@ -0,0 +1,26 @@
name: Deploy to NAS
on:
push:
branches: [main]
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Write .env
run: printf 'DB_PASSWORD=%s\n' '${{ secrets.DB_PASSWORD }}' > ${{ secrets.DEPLOY_DIR }}/.env
- name: Build & Deploy
run: |
cp -r ${{ github.workspace }}/. ${{ secrets.DEPLOY_DIR }}/
docker compose -f ${{ secrets.DEPLOY_DIR }}/docker-compose.yml up --build -d
- name: Health check
run: |
sleep 15
curl -sf http://localhost:9050/healthz || exit 1