new file: pdf_export.py modified: requirements.txt modified: routes/journal_routes.py modified: static/css/style.css modified: templates/base.html modified: templates/day.html new file: templates/edit_future.html new file: templates/edit_note.html modified: templates/future.html modified: templates/monat.html new file: templates/report.html modified: templates/week.html
39 lines
1.1 KiB
Docker
39 lines
1.1 KiB
Docker
# 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 DB_HOST=$DB_HOST
|
|
ENV DB_PORT=$DB_PORT
|
|
ENV DB_USER=$DB_USER
|
|
ENV DB_PASSWORD=$DB_PASSWORD
|
|
ENV DB_DATABASE=$DB_DATABASE
|
|
ENV SECRET_KEY=$SECRET_KEY
|
|
ENV PEPPER=$PEPPER
|
|
ENV ADMIN_USERNAME=$ADMIN_USERNAME
|
|
ENV ADMIN_PASSWORD=$ADMIN_PASSWORD
|
|
|
|
# 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"]
|