FastAPI-Backend und React-Frontend mit Konten, Sendungsverfolgung, Projekt-Artikeln, Vorrat & Einkauf mit Rezeptabgleich, Reise-Weltkarte, Kanban-Projekten mit Priorität, Server-Monitoring und den Designs Matrix und Blackwall. Betrieb per Docker hinter nginx (siehe DEPLOY.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
783 B
Bash
Executable File
22 lines
783 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Startet das P42 Dashboard: richtet beim ersten Mal alles ein,
|
|
# baut das Frontend neu, wenn sich etwas geändert hat, und startet das Backend.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
[ -f config.json ] || cp config.example.json config.json
|
|
|
|
if [ ! -x backend/.venv/bin/python ]; then
|
|
echo "→ Python-Umgebung einrichten …"
|
|
python3 -m venv --without-pip backend/.venv
|
|
python3 -m pip --python backend/.venv/bin/python install -q -r backend/requirements.txt
|
|
fi
|
|
|
|
if [ ! -f frontend/dist/index.html ] || [ -n "$(find frontend/src frontend/index.html -newer frontend/dist/index.html -print -quit)" ]; then
|
|
echo "→ Frontend bauen …"
|
|
(cd frontend && { [ -d node_modules ] || npm install; } && npm run build)
|
|
fi
|
|
|
|
cd backend
|
|
exec .venv/bin/python -m app
|