Files
bjoernpoettker 41eed1871e
Build and Push Multi-Platform Images / build-and-push (push) Successful in 44s
fix: Produktions-Crash durch TypeORM-synchronize beheben
NODE_ENV=production deaktiviert synchronize (zerstörerischer ADD/DROP-COLUMN-
Churn auf MariaDB, der die 8126-Byte-Zeilengröße sprengte) und aktiviert
migrationsRun. Neue data-source.ts als einzige Konfigquelle (Laufzeit + CLI),
Migrations-Workflow (generate/run/revert) inkl. dotenv ergänzt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 09:27:04 +02:00

77 lines
3.0 KiB
Bash

# =============================================================================
# Paperless Manager - Docker Compose Konfiguration
# =============================================================================
# Kopiere diese Datei nach .env und passe die Werte an.
#
# Lokal: VITE_API_URL=http://localhost:3100 (direkter Zugriff)
# Produktion: VITE_API_URL leer lassen (nginx Reverse-Proxy leitet /api weiter)
# =============================================================================
# --- Umgebung ---
# Produktion: NODE_ENV=production -> KEIN TypeORM-synchronize (Schema via Migrationen),
# Migrationen werden beim Start automatisch ausgeführt (migrationsRun).
# Aktiviert zudem CORS-Schutz (siehe CORS_ORIGIN weiter unten).
# Entwicklung: NODE_ENV leer lassen -> synchronize ON (Schema folgt den Entities).
NODE_ENV=production
# --- Ports ---
BACKEND_PORT=7601
FRONTEND_PORT=7600
# --- MySQL Datenbank (extern) ---
DB_HOST=192.168.1.x
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=changeme
DB_DATABASE=paperlessadd
# --- Paperless-ngx ---
PAPERLESS_URL=http://paperless:8000
PAPERLESS_TOKEN=your_paperless_api_token
# --- Ollama OCR ---
OLLAMA_URL=http://ollama:11434
OLLAMA_MODEL=llava
# --- Scanner ---
SCANNER_WATCH_DIR=/data/scanner
SCANNER_ARCHIVE_DIR=/data/scanner/_processed_archive
# --- OIDC / Authentik ---
OIDC_ISSUER=https://auth.example.com/application/o/your-app-slug
OIDC_CLIENT_ID=your-oidc-client-id
OIDC_REDIRECT_URI=https://dokumente.example.com/auth/callback
# --- Frontend API-URL ---
# Lokal: http://localhost:3100 (Backend direkt)
# Produktion: leer lassen (nginx proxied /api → Backend)
VITE_API_URL=
# --- Interne Belegnummer API ---
# Platzhalter {Jahr} wird zur Laufzeit durch das Jahr des Eingangsdatums ersetzt
BELEGNUMMER_GET_URL=https://beispiel-api.de/get-number/{Jahr}
BELEGNUMMER_SET_URL=https://beispiel-api.de/set-number/{Jahr}/{Nummer}
# --- CORS ---
# Erlaubte Frontend-Origin für CORS. In Produktion PFLICHT (z.B. https://paperless.example.com).
# Leer lassen für lokale Entwicklung (erlaubt alle Origins).
# NODE_ENV=production ohne CORS_ORIGIN blockiert alle Cross-Origin-Anfragen.
CORS_ORIGIN=
# --- Agrarmonitor ---
AGRARMONITOR_BASE_URL=https://admin7.agrarmonitor.de
AGRARMONITOR_API_BASE_URL=https://api.agrarmonitor.de
AGRARMONITOR_USERNAME=
AGRARMONITOR_PASSWORD=
AGRARMONITOR_API_TOKEN=
AGRARMONITOR_COOKIE_PATH=./data/agrarmonitor-cookies.json
AGRARMONITOR_ENCRYPTION_KEY= # optional, 16+ Zeichen für Cookie-Verschlüsselung
AGRARMONITOR_POLLING_CRON=0 */30 * * * * # Polling-Intervall (Standard: alle 30 Minuten); leer lassen zum Deaktivieren
AGRARMONITOR_UPLOAD_CHECK_CRON=0 * * * * * # Upload-Check-Intervall (Standard: einmal pro Minute); leer lassen zum Deaktivieren
# --- Täglicher Digest ---
# Basis-URL der App für klickbare Links in Digest-E-Mails (z.B. https://paperless.example.com)
# Leer lassen: E-Mails werden ohne Links versendet
APP_URL=
DAILY_DIGEST_CRON= # Standard: 0 7 * * * (täglich 07:00 Uhr Europe/Berlin)