gateway/ida_prod/start.sh
2025-03-14 00:29:45 +01:00

22 lines
472 B
Bash

#!/bin/bash
# Installiere Abhängigkeiten
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Migration durchführen
python manage.py migrate
python manage.py collectstatic --noinput
# React bauen
cd ../frontend
npm install
npm run build
# React-Frontend nach Django-Statisches-Verzeichnis verschieben
cp -r build/* ../backend/staticfiles/
# Starte Gunicorn (Django-Server)
cd ../backend
gunicorn backend.wsgi --bind 0.0.0.0:8000