Commit da0dc0bb authored by Gezer's avatar Gezer
Browse files

Refactor backend and stream processing structure

- Updated Dockerfile in backend to set PYTHONPATH and modify CMD for Django server.
- Changed permissions for multiple Python files in backend to make them executable.
- Adjusted import paths in influxdb_service.py and views.py to reflect new structure.
- Removed unused utils and loggingFactory files from stream_processing.
- Added new utils for logging and flux query building.
- Enhanced error handling and logging in mQTTClientHandler.py.
- Updated docker-compose.yaml to include utils directory for both backend and stream processing services.
- Improved JSON handling in jsonhandler.py with better exception management.
parent 7ba8a99b
No related merge requests found
Showing with 7 additions and 9 deletions
+7 -9
File mode changed from 100644 to 100755
# Verwende das neueste Python-Image
FROM python:latest
# Setze das Arbeitsverzeichnis im Container
WORKDIR /app
ENV PYTHONPATH="${PYTHONPATH}:/app:/app/utils"
# Kopiere Projektdateien für Abhängigkeitsmanagement
COPY . .
......@@ -18,11 +19,8 @@ RUN uv venv .venv && \
# Installiere die Abhängigkeiten aus pyproject.toml
RUN uv sync
# Make entrypoint script executable
RUN chmod +x entrypoint.sh
# Exponiere Port 8000 (für Django)
EXPOSE 8000
# Use entrypoint script
CMD ["./entrypoint.sh"]
# Startbefehl (z. B. für Django-Projekt)
CMD ["uv", "run", "sh", "-c", ".venv/bin/python manage.py migrate && .venv/bin/python manage.py runserver 0.0.0.0:8000"]
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
import os
from dotenv import load_dotenv
from utils.fluxQueryBuilder import FluxQueryBuilder
from utils.influx import InfluxDBHelper
from ...utils.fluxQueryBuilder import FluxQueryBuilder
from ...utils.influx import InfluxDBHelper
load_dotenv()
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -6,7 +6,7 @@ from django.shortcuts import render
from django.http import JsonResponse
from django.views.decorators.csrf import ensure_csrf_cookie, csrf_protect
import json
from utils.influx import InfluxDBHelper
from ...utils.influx import InfluxDBHelper
from dotenv import load_dotenv
from django.views.decorators.http import require_http_methods
from django.views.decorators.csrf import csrf_exempt
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment