- Neue Docker-Struktur: docker/{dev,prod}/ für klare Trennung
- Entfernt: docker-compose.override.yml (problematisch)
- Hinzugefügt: ./dev.sh und ./prod.sh Scripts für einfache Bedienung
- Container-spezifische Konfigurationen in docker/{dev,prod}/*/config/
- Aktualisierte READMEs für neue Struktur
- Backend-Daten in .gitignore hinzugefügt
- Bereinigt: Veraltete Dockerfiles und Konfigurationsdateien
Jetzt: Wartungsfreundlich, keine Verwirrung zwischen Umgebungen
26 lines
671 B
Bash
26 lines
671 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Make public writable so env.sh can write env-config.js
|
|
chmod -R a+rw ./public || true
|
|
|
|
# Run env.sh if present
|
|
if [ -x ./env.sh ]; then
|
|
./env.sh || true
|
|
fi
|
|
|
|
# Ensure node cache exists and is writable
|
|
mkdir -p /app/node_modules/.cache || true
|
|
chmod -R a+rw /app/node_modules || true
|
|
|
|
# Ensure HOST is set so CRA binds to 0.0.0.0
|
|
export HOST=${HOST:-0.0.0.0}
|
|
|
|
echo "🚀 Starting React development server..."
|
|
# Start the React development server in background
|
|
npm run dev &
|
|
DEV_PID=$!
|
|
|
|
echo "🌐 Starting nginx proxy..."
|
|
# Start nginx in foreground so container stays alive; nginx will proxy to the dev server
|
|
exec nginx -g 'daemon off;' |