From 0863fe8576cc52c7622891e6022abbbdb55302ed Mon Sep 17 00:00:00 2001 From: Bast Date: Sun, 1 Nov 2026 10:42:32 -0600 Subject: [PATCH] fix: schalte django static asset routing frei und korrigiere dateirechte im image --- Dockerfile | 3 +++ core/urls.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d24fb38..0ee9a3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r re COPY . /app/ +# KORRIGIERT: Stellt sicher, dass die JS-Assets für Gunicorn lesbar sind +RUN chmod -R 755 /app/monitor/static/ + EXPOSE 8000 CMD ["gunicorn", "core.wsgi:application", "--bind", "0.0.0.0:8000"] diff --git a/core/urls.py b/core/urls.py index ad81bcb..25d9d44 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,9 +1,13 @@ from django.urls import path +from django.contrib.staticfiles.urls import staticfiles_urlpatterns from monitor.views import DashboardView, ClusterGraphDataView, StatePushReceiverView urlpatterns = [ path('', DashboardView.as_view(), name='dashboard'), path('api/cluster-data/', ClusterGraphDataView.as_view(), name='cluster_data'), - # DER NEUE INTERNATIONALE PUSH-ENDPUNKT path('api/v1/push/', StatePushReceiverView.as_view(), name='api_push'), ] + +# ZWINGEND NOTWENDIG FÜR DEN SEXT-RUN IM CONTAINER: +# Erlaubt Django, die statischen JavaScript-Dateien direkt im Gunicorn-Prozess auszuliefern +urlpatterns += staticfiles_urlpatterns()