refactor: enhance environment configuration and CI workflow for improved flexibility
- Updated .env.example to provide clearer instructions and examples for production and development environments. - Refactored docker-compose files to utilize environment variables for database and application settings, improving configurability. - Enhanced .gitea/workflows/test.yml to streamline E2E testing setup, ensuring consistent handling of environment variables across different stages.
This commit is contained in:
1 parent
f4a86f9726
commit
fe86d763ad
5 files changed
+91
-78
No files matched your search
+23
-16
@@ -1,49 +1,56 @@
|
||||
# === Deploy (.env auf dem Host) ============================================
|
||||
# Kopiere diese Datei nach `.env` im SELBEN Verzeichnis wie `docker-compose.yml` (Pi: ~/docker/shinkan).
|
||||
# Docker Compose liest `.env` beim Start — dadurch wird z. B. SMTP_HOST=${SMTP_HOST} gefüllt.
|
||||
# Ist die Datei weg/leer oder steht SMTP_PASS nicht darin → im Container keine SMTP-Daten ([SMTP] nicht konfiguriert).
|
||||
# === .env neben der Jeweiligen docker-compose.*.yml kopieren ====================
|
||||
# Docker Compose ersetzt ${VARIABLE} beim Start.
|
||||
#
|
||||
# Pro Umgebung eigene Datei (z. B. ~/docker/shinkan/.env für Prod,
|
||||
# ~/docker/shinkan-dev/.env für Dev) — dieselben SCHLÜSSEL, unterschiedliche Werte.
|
||||
# Kein separates DEV_APP_URL vs APP_URL: immer APP_URL, ALLOWED_ORIGINS, DB_*, …
|
||||
|
||||
# Database
|
||||
# ─── Typische Werte PROD (docker-compose.yml) ─────────────────────────────────
|
||||
# DB_NAME=shinkan
|
||||
# DB_USER=shinkan_user
|
||||
# DB_PASSWORD=…
|
||||
# APP_URL=https://shinkan.jinkendo.de
|
||||
# ALLOWED_ORIGINS=https://shinkan.jinkendo.de
|
||||
# ENVIRONMENT=production
|
||||
|
||||
# ─── Typische Werte DEV (docker-compose.dev-env.yml) ─────────────────────────
|
||||
# DB_NAME=shinkan_dev
|
||||
# DB_USER=shinkan_dev
|
||||
# DB_PASSWORD=dev_password
|
||||
# APP_URL=https://dev.shinkan.jinkendo.de
|
||||
# ALLOWED_ORIGINS=https://dev.shinkan.jinkendo.de,http://192.168.2.49:3098
|
||||
# ENVIRONMENT=development
|
||||
|
||||
# ─── Ab hier: eine ausfüllbare Vorlage (bei uns meist Prod-Defaults) ───────────
|
||||
DB_HOST=postgres
|
||||
DB_PORT=5432
|
||||
DB_NAME=shinkan
|
||||
DB_USER=shinkan_user
|
||||
DB_PASSWORD=CHANGE_ME_SECURE_PASSWORD
|
||||
|
||||
# OpenRouter (KI - optional)
|
||||
OPENROUTER_API_KEY=your_api_key_here
|
||||
OPENROUTER_MODEL=anthropic/claude-sonnet-4
|
||||
|
||||
# SMTP (E-Mail)
|
||||
SMTP_HOST=smtp.example.com
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=noreply@jinkendo.de
|
||||
SMTP_PASS=your_smtp_password
|
||||
SMTP_FROM=noreply@jinkendo.de
|
||||
# Port 465 oft SSL; dann z. B. SMTP_SSL=true und SMTP_STARTTLS=false
|
||||
SMTP_SSL=
|
||||
SMTP_STARTTLS=
|
||||
|
||||
# Bootstrap: erste Registrierung (leere Nutzerliste) erhält Rolle admin; oder feste Admin-Mails:
|
||||
AUTO_ADMIN_FIRST_USER=true
|
||||
ADMIN_BOOTSTRAP_EMAILS=
|
||||
|
||||
# App
|
||||
APP_URL=https://shinkan.jinkendo.de
|
||||
# Kommasepariert (ohne Leerzeichen um die Kommas ist am sichersten). Für Dev mehrere Origins nötig (HTTPS + LAN).
|
||||
ALLOWED_ORIGINS=https://shinkan.jinkendo.de
|
||||
ENVIRONMENT=production
|
||||
|
||||
# Nur docker-compose.dev-env.yml (optional): DEV_APP_URL, DEV_ALLOWED_ORIGINS
|
||||
|
||||
# Media Storage
|
||||
MEDIA_DIR=/app/media
|
||||
|
||||
# MediaWiki Import (Semantic MediaWiki)
|
||||
MEDIAWIKI_API_URL=https://karatetrainer.net/api.php
|
||||
MEDIAWIKI_USER=Jinkendo
|
||||
MEDIAWIKI_PASSWORD=CHANGE_ME
|
||||
# Kategorienamen im Wiki (echte Namen von karatetrainer.net)
|
||||
MEDIAWIKI_CATEGORY_EXERCISES=Übungen
|
||||
MEDIAWIKI_CATEGORY_SKILLS=Fähigkeitsbeschreibung
|
||||
MEDIAWIKI_CATEGORY_METHODS=Methodenbeschreibung
|
||||
|
||||
Reference in new issue
Block a user