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

46
server/Dockerfile.dev Normal file
View File

@@ -0,0 +1,46 @@
# Datei: server/Dockerfile.dev
# Entwicklungs-Dockerfile für die API (Flask + SQLAlchemy)
FROM python:3.13-slim
# Build args für UID/GID
ARG USER_ID=1000
ARG GROUP_ID=1000
# Erstelle non-root User
RUN apt-get update \
&& apt-get install -y --no-install-recommends locales curl \
&& groupadd -g ${GROUP_ID} infoscreen_taa \
&& useradd -u ${USER_ID} -g ${GROUP_ID} --shell /bin/bash --create-home infoscreen_taa \
&& sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=de_DE.UTF-8 \
LANGUAGE=de_DE:de \
LC_ALL=de_DE.UTF-8
# Arbeitsverzeichnis
WORKDIR /app
# Kopiere nur Requirements für schnellen Rebuild
COPY requirements.txt ./
COPY requirements-dev.txt ./
# Installiere Python-Abhängigkeiten (Prod + Dev)
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir -r requirements-dev.txt
# Expose Ports für Flask API
EXPOSE 8000
# Setze Env für Dev
ENV FLASK_ENV=development
ENV ENV_FILE=.env
# Wechsle zum non-root User
USER infoscreen_taa
# Default Command: Flask Development Server
CMD ["flask", "run", "--host=0.0.0.0", "--port=8000"]