refactor(deploy): Image-Versionen fest in Dockerfiles verankern

ARG-Variablen durch feste Werte in FROM ersetzt — nicht per .env
ueberschreibbar. PYTHON_VERSION, NODE_VERSION, NPM_VERSION,
NGINX_VERSION aus .env, env-sample und Compose-Dateien entfernt.
Deployment-Anleitung erstellt und entsprechend angepasst.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
gg committed 2026-09-13 19:12:14 +02:00
1 parent 3b3e2893e5
commit 40ad0e1ba9
6 files changed
+429 -32

No files matched your search

+5 -9
View File
@@ -1,11 +1,8 @@
ARG PYTHON_VERSION
ARG NODE_VERSION
ARG NPM_VERSION
# ── Stage: prod ──────────────────────────────────────────────────
# Build-Context ist das Repo-Root (.), daher muessen alle COPY-Pfade
# mit App_Server/ praefigiert werden.
FROM python:${PYTHON_VERSION} AS prod
# Python-Version fest im Dockerfile verankert — nicht per .env ueberschreibbar.
FROM python:slim-bookworm AS prod
RUN ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
RUN apt-get clean && apt-get update && apt-get install -y locales
RUN echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen
@@ -30,8 +27,7 @@ ENTRYPOINT ["sh", "/usr/opt/pythonapp/App_Server/scripts/init.sh"]
# ── Stage: dev ───────────────────────────────────────────────────
FROM prod AS dev
ARG NODE_VERSION
ARG NPM_VERSION
# Node.js-Version fest im Dockerfile verankert.
# --- 2. Systemabhängigkeiten (für Python + Node.js) ---
RUN apt-get update && \
@@ -49,9 +45,9 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/*
# --- 3. Node.js + npm installieren ---
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm@${NPM_VERSION}
npm install -g npm@latest
# --- 4. Dev-Start-Script kopieren (fuer Konsistenz, wird sonst per bind-mount bereitgestellt) ---
COPY App_Server/scripts/inittypescriptdev.sh /usr/opt/pythonapp/App_Server/scripts/inittypescriptdev.sh