Files
youtube-studio-flow/infrastructure/README.md
T
devil d6ff99e8a4 feat(infrastructure): pull pre-built images from Gitea registry
migrate/api/worker/frontend now reference
git.devils.zone/devil/youtube-studio-flow-{backend,frontend}:\${IMAGE_TAG}
instead of building on the deploy host. Adds scripts/build-and-push.sh
to build+tag (git short SHA + latest) and push both images from a dev
machine, and updates infrastructure/README.md with the pull-based
deploy sequence.
2026-08-11 14:18:30 +02:00

34 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# StudioFlow — Infrastruktur
## Übersicht
Dieses Verzeichnis enthält die Konfiguration für die lokale Entwicklung und das Deployment mittels Docker Compose.
## Dienste
- **frontend:** Next.js UI (Port 3000)
- **api:** NestJS REST API (Port 3001)
- **worker:** NestJS BullMQ Consumer
- **postgres:** PostgreSQL 16 (Port 5432)
- **redis:** Redis 7 für Caching und Queues (Port 6379)
## Schnellstart (Server-Deployment)
Images werden **nicht** auf dem Server gebaut — sie kommen fertig aus der Gitea Container
Registry (`git.devils.zone/devil/youtube-studio-flow-{backend,frontend}`), gebaut per
`scripts/build-and-push.sh` auf der Dev-Maschine.
1. `.env.example` kopieren: `cp .env.example .env`
2. Werte in `.env` anpassen (Secrets, Domain, Google API Keys, `IMAGE_TAG`).
3. Am Server einloggen: `docker login git.devils.zone`
4. Images ziehen: `docker compose pull`
5. Datenbank migrieren: `docker compose run --rm migrate`
6. Container starten: `docker compose up -d`
Für ein Update auf eine neue Version: `IMAGE_TAG` in `.env` anpassen (oder `latest`
belassen), dann Schritte 46 wiederholen. Das externe Docker-Netzwerk `traefik-network`
muss vorher existieren (`docker network create traefik-network`), falls Traefik das nicht
bereits selbst anlegt.
## Daten-Persistenz
- PostgreSQL-Daten liegen im Volume `postgres_data`.
- Redis-Daten liegen im Volume `redis_data`.