new file: Dockerfile
new file: README.md new file: docker-compose.yml new file: nginx/templates/default.conf.template
This commit is contained in:
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
# Basis-Image mit Python
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Arbeitsverzeichnis erstellen
|
||||
WORKDIR /app
|
||||
|
||||
# System-Dependencies: DejaVu-Schriftarten für PDF-Export (Umlaute)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
fonts-dejavu-core \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Kopiere die requirements-Datei und installiere die Abhängigkeiten
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Kopiere den gesamten Projektinhalt in das Arbeitsverzeichnis
|
||||
COPY . .
|
||||
|
||||
# Umgebungsvariablen von Coolify / docker-compose übernehmen (zur Laufzeit)
|
||||
ENV SECRET_KEY=$SECRET_KEY
|
||||
|
||||
|
||||
# Nicht-root Benutzer aus Sicherheitsgründen
|
||||
RUN useradd --create-home appuser && chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
# Port für Gunicorn
|
||||
EXPOSE 8000
|
||||
|
||||
# Startbefehl (Production: Gunicorn)
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "app:app"]
|
||||
Reference in New Issue
Block a user