feat(deploy): Multi-Stage-Docker-Build fuer automatisches Deployment

- App_Server/Dockerfile: Build-Context auf Repo-Root, COPY-Pfade
  angepasst, ENTRYPOINT aktiviert, dev-Stage mit inittypescriptdev.sh
- NGINX_Server/Dockerfile: Multi-Stage mit frontend-Stage (Node.js baut
  TypeScript), statische Dateien und Config-Templates ins Image kopiert
- docker-compose.base.yaml: Context auf '.', python-venv Volume entfernt,
  NGINX_STATIC_DIR/CONFIG_TEMPLATE_DIR bind-mounts in Dev verschoben
- docker-compose.dev.yaml: python-venv-dev Volume, APP_DEBUG=true,
  nginx-proxy mit bind-mounts fuer statische Dateien und Templates
- docker-compose.prod.yaml: Code-bind-mount entfernt, nginx-proxy extends
- approot.py: absolute Pfade, Debug-Modus via APP_DEBUG Umgebungsvariable
- init.sh: vereinfacht (kein cd/pip, absolute Pfade)
- inireader.mjs: absoluter Pfad fuer config.ini
- package.json: scripts.build (tsc + rollup) ergaenzt
- .dockerignore, deploy-kbcrm-test.sh, deploy-kbcrm-prod.sh erstellt
- docker-compose.save.yaml geloescht
- env-sample: BUILD_ENVIRONMENT nach oben, Dev-only Variablen markiert

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
gg committed 2026-09-13 18:40:55 +02:00
1 parent 31ef206bd8
commit 3b3e2893e5
14 files changed
+200 -91

No files matched your search

+16 -3
View File
@@ -6,17 +6,30 @@ services:
service: pythonapp
build:
target: dev
args: # Übergibt die ARGS an das dockerfile
# PYTHON_VERSION: ${PYTHON_VERSION}
args:
NODE_VERSION: ${NODE_VERSION:-18}
NPM_VERSION: ${NPM_VERSION:-8}
environment:
# Globales Vibe-Home innerhalb des Workspace-Bind-Mounts, damit es auf dem Host persistiert
- VIBE_HOME=/usr/opt/pythonapp/.vibe-global
# Debug-Modus aktivieren — Werkzeug-Reloader statt Waitress
- APP_DEBUG=true
volumes:
- ${PYTHON_DEV_DIR}:/usr/opt/pythonapp
# - ${TYPESCRIPT_SRC_DIR}:/usr/opt/typescript
# python-venv-dev: venv als Volume, da der bind-mount das Image-venv ueberlagert
- python-venv-dev:/usr/opt/pythonapp/env
- node-modules:/usr/opt/typescript/node_modules
nginx-proxy:
extends:
file: docker-compose.base.yaml
service: nginx-proxy
volumes:
# Statische Dateien per bind-mount — Aenderungen (tsc/rollup, CSS) sofort sichtbar
- ${NGINX_STATIC_DIR}:/usr/share/nginx/html:ro
# Config-Templates per bind-mount — Aenderungen an NGINX-Config sofort sichtbar
- ${NGINX_CONFIG_TEMPLATE_DIR}:/etc/nginx/configtemplates:ro
volumes:
python-venv-dev:
node-modules: