refactor: update media handling configuration and improve upload acceptance
Deploy Development / deploy (push) Successful in 38s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Failing after 1m45s

- Modified .env.example to include SHINKAN_MEDIA_HOST and MEDIA_ROOT for better media path management.
- Updated docker-compose files to utilize SHINKAN_MEDIA_HOST for volume mounts, ensuring consistent media directory handling across environments.
- Enhanced ExerciseFormPage and MediaLibraryPage to specify accepted media types explicitly, improving compatibility and user experience during uploads.
This commit is contained in:
Lars committed 2026-05-08 08:35:15 +02:00
1 parent ceef6f09e2
commit c921f0dd8f
5 files changed
+30 -20

No files matched your search

+10 -9
View File
@@ -8,18 +8,16 @@
# ─── 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
# SHINKAN_MEDIA_HOST=/shinkan-media
# MEDIA_ROOT=/app/media
# …
# ─── 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
# SHINKAN_MEDIA_HOST=/shinkan-media/dev
# MEDIA_ROOT=/app/media
# …
# ─── Ab hier: eine ausfüllbare Vorlage (bei uns meist Prod-Defaults) ───────────
DB_HOST=postgres
@@ -46,7 +44,10 @@ APP_URL=https://shinkan.jinkendo.de
ALLOWED_ORIGINS=https://shinkan.jinkendo.de
ENVIRONMENT=production
MEDIA_DIR=/app/media
# Host-Pfad auf dem Rechner (Bind-Mount); im Container siehe MEDIA_ROOT. Pflicht für docker compose up.
SHINKAN_MEDIA_HOST=/shinkan-media
# Optional: Pfad im Container (FastAPI MEDIA_ROOT); Standard reicht fast immer.
MEDIA_ROOT=/app/media
MEDIAWIKI_API_URL=https://karatetrainer.net/api.php
MEDIAWIKI_USER=Jinkendo