modified: Dockerfile
deleted: docker-compose.yml renamed: nginx/templates/default.conf.template -> nginx/conf.d/default.conf
This commit is contained in:
41
Dockerfile
41
Dockerfile
@@ -1,31 +1,20 @@
|
||||
# Basis-Image mit Python
|
||||
FROM python:3.11-slim
|
||||
# === Bluemap Reverse Proxy (Nginx) ===
|
||||
# Liefert http://devanturas.net:8100 über HTTPS (via Coolify-Proxy)
|
||||
# als iframe-fähige Karte auf map.devanturas.net aus.
|
||||
#
|
||||
# HTTPS & Domain übernimmt der Coolify-eigene Proxy (Traefik/Caddy).
|
||||
# Dieser Container läuft dahinter auf HTTP/Port 80.
|
||||
|
||||
# Arbeitsverzeichnis erstellen
|
||||
WORKDIR /app
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
# 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/*
|
||||
# Statische Nginx-Proxy-Konfiguration in den Container kopieren
|
||||
# (inerv /etc/nginx/conf.d/default.conf -> automatisch geladen)
|
||||
COPY nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Kopiere die requirements-Datei und installiere die Abhängigkeiten
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Konfiguration beim Build validieren (fail-fast)
|
||||
RUN nginx -t
|
||||
|
||||
# Kopiere den gesamten Projektinhalt in das Arbeitsverzeichnis
|
||||
COPY . .
|
||||
# Port, an dem der Nginx lauscht (Coolify klinkt hier HTTP an)
|
||||
EXPOSE 80
|
||||
|
||||
# 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"]
|
||||
# Standard-Startbefehl des nginx-Images wird beibehalten (nginx -g "daemon off;")
|
||||
|
||||
Reference in New Issue
Block a user