- Multi-stage Dockerfile: builds frontend, packages with Python backend - admin.py serves frontend/dist as StaticFiles in production - docker-entrypoint.sh runs proxy + admin-api, exits cleanly if either dies - .dockerignore excludes .env, venv, tests, node_modules - Split requirements.txt (prod) / requirements-dev.txt (dev+test) - aiofiles added for StaticFiles support - start.sh: port checks before startup, venv auto-activation, trap cleanup - vite.config.js: clearScreen disabled - README rewritten to reflect current architecture Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
360 B
Bash
20 lines
360 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
cd /app/backend
|
|
python3 init_db.py
|
|
|
|
uvicorn main:app \
|
|
--host "${PROXY_HOST:-0.0.0.0}" \
|
|
--port "${PROXY_PORT:-8000}" &
|
|
PROXY_PID=$!
|
|
|
|
uvicorn admin:app \
|
|
--host "0.0.0.0" \
|
|
--port "${ADMIN_PORT:-8001}" &
|
|
ADMIN_PID=$!
|
|
|
|
# Beendet den Container wenn einer der Prozesse stirbt
|
|
wait -n
|
|
kill "$PROXY_PID" "$ADMIN_PID" 2>/dev/null
|