feat: Docker-Integration hinzugefügt - Dockerfile, docker-compose.yml und .dockerignore erstellt - README.md mit umfassender Docker-Dokumentation erweitert - Multi-Service-Architektur für Hauptservice und Statistik-Service - Lokale Volume-Mappings für .env und .json Dateien - Vollständige Docker-Handhabung dokumentiert
This commit is contained in:
19
Dockerfile
19
Dockerfile
@ -1,11 +1,26 @@
|
||||
# Dockerfile für TI-Status2Mattermost
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Arbeitsverzeichnis setzen
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt ./
|
||||
# System-Abhängigkeiten installieren
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Python-Abhängigkeiten kopieren und installieren
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
# Anwendungsdateien kopieren
|
||||
COPY ti_status_checker.py .
|
||||
COPY ti_statistics.py .
|
||||
|
||||
# Nicht-root Benutzer erstellen
|
||||
RUN useradd --create-home --shell /bin/bash appuser && \
|
||||
chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
# Standardbefehl
|
||||
CMD ["python", "ti_status_checker.py"]
|
||||
Reference in New Issue
Block a user