Dockerfile und docker-compose angepasst wegen Zugriffsberechtigung bei Docker

This commit is contained in:
2026-03-02 17:22:31 +00:00
parent 26a9a267a0
commit 2299d5f78c
3 changed files with 8 additions and 3 deletions

View File

@@ -13,8 +13,12 @@ COPY main.py .
COPY monitor.py . COPY monitor.py .
COPY scheduler.py . COPY scheduler.py .
# Erstelle Verzeichnis für Videospeicher # Erstelle Non-root-User und setze Verzeichnisrechte
RUN mkdir -p /app/videospeicher RUN useradd -u 1000 -m appuser \
&& mkdir -p /app/videospeicher \
&& chown -R appuser:appuser /app
USER appuser
# Setze Umgebungsvariablen # Setze Umgebungsvariablen
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1

View File

@@ -24,6 +24,7 @@ services:
build: . build: .
container_name: camerasave-monitor container_name: camerasave-monitor
restart: unless-stopped restart: unless-stopped
user: "1000:1000"
volumes: volumes:
- heartbeat:/app - heartbeat:/app
env_file: env_file:

View File

@@ -123,7 +123,7 @@ def process_mails():
# Mail nach Verarbeitung löschen # Mail nach Verarbeitung löschen
mail.store(num, "+FLAGS", "\\Deleted") mail.store(num, "+FLAGS", "\\Deleted")
# mail.expunge() mail.expunge()
mail.logout() mail.logout()