docker-composes angepasst

This commit is contained in:
2025-09-24 21:33:00 +00:00
parent a9428fee94
commit 744488fb5b
7 changed files with 256 additions and 12 deletions

View File

@@ -0,0 +1,51 @@
# Archivierte Compose Varianten
Die früheren Dateien `docker-compose.production.yml`, `docker-compose.registry.yml`, `docker-compose.local-network.yml`, `docker-compose.traefik.yml` wurden konsolidiert.
## Neuer Ansatz
Basis: `docker-compose.yml`
Optionale Overrides:
- Produktion (ohne Traefik Build-Free): `docker-compose.prod.yml`
- Registry Images statt Build: `docker-compose.registry.override.yml`
- Traefik + HTTPS Routing: `docker-compose.traefik.override.yml`
## Beispiele
Lokale Entwicklung (modern stack):
```bash
docker compose up -d
```
Produktion (mit Registry Images):
```bash
docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.registry.override.yml up -d
```
Produktion + Traefik (HTTPS / Domain Routing):
```bash
docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.registry.override.yml -f docker-compose.traefik.override.yml up -d
```
Nur Traefik Layer nachträglich hinzufügen:
```bash
docker compose -f docker-compose.traefik.override.yml up -d traefik
```
## Variablen (.env empfohlen)
```
DOMAIN=example.com
ACME_EMAIL=admin@example.com
MYSQL_PASSWORD=secure_db_pwd
MYSQL_ROOT_PASSWORD=secure_root_pwd
JWT_SECRET=32+_chars_secret_here
CORS_ORIGIN=https://rezepte.${DOMAIN}
BACKEND_IMAGE=ghcr.io/<user>/rezepte-backend:latest
FRONTEND_IMAGE=ghcr.io/<user>/rezepte-frontend:latest
```
## Hinweise
- Seed-SQL Mounts in Produktion nur beim Erst-Deploy aktivieren.
- Traefik Basic Auth Hash austauschen.
- `CORS_ORIGIN="*"` im Development nicht in Produktion übernehmen.