initial commit

This commit is contained in:
2025-06-03 14:01:08 +00:00
commit 6ab9ceed4b
50 changed files with 2253 additions and 0 deletions

42
server/Dockerfile Normal file
View File

@@ -0,0 +1,42 @@
# server/Dockerfile
# Produktions-Dockerfile für die Flask-API mit Gunicorn
# --- Basisimage ---
FROM python:3.13-slim
# --- Arbeitsverzeichnis ---
WORKDIR /app
# --- Systemabhängigkeiten für MariaDB-Client & Locale ---
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libmariadb-dev-compat libmariadb-dev locales \
&& rm -rf /var/lib/apt/lists/*
# --- Locale konfigurieren ---
RUN sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
ENV LANG=de_DE.UTF-8 \
LC_ALL=de_DE.UTF-8
# --- Python-Abhängigkeiten ---
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# --- Applikationscode ---
COPY server/ /app
# --- Non-Root User anlegen und Rechte setzen ---
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN groupadd -g ${GROUP_ID} infoscreen_taa \
&& useradd -u ${USER_ID} -g ${GROUP_ID} \
--shell /bin/bash --create-home infoscreen_taa \
&& chown -R infoscreen_taa:infoscreen_taa /app
USER infoscreen_taa
# --- Port für die API exposed ---
EXPOSE 8000
# --- Startbefehl für Gunicorn ---
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "wsgi:app"]