initial commit
This commit is contained in:
46
server/Dockerfile.dev
Normal file
46
server/Dockerfile.dev
Normal 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"]
|
||||
Reference in New Issue
Block a user