deployment_raspberry
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| deployment_raspberry [2025/10/30 17:20] – ninin | deployment_raspberry [2025/11/27 22:39] (current) – ninin | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| Virtual environment | Virtual environment | ||
| cd sese_project/ | cd sese_project/ | ||
| + | python3 -m venv env | ||
| source env/ | source env/ | ||
| + | pip install -r app/ | ||
| - | Create Database | + | Set Environment Variables |
| + | | ||
| + | export POSTGRES_DB=< | ||
| + | export POSTGRES_USER=< | ||
| + | export POSTGRES_PASSWORD=< | ||
| Start Dev Server | Start Dev Server | ||
| Line 64: | Line 69: | ||
| python manage.py collectstatic | python manage.py collectstatic | ||
| + | With cleanup: | ||
| + | python manage.py collectstatic --noinput --clear | ||
| === Nginx === | === Nginx === | ||
| Line 84: | Line 91: | ||
| sudo nano / | sudo nano / | ||
| - | | + | |
| + | Bei Änderungen: | ||
| + | |||
| + | systemctl daemon-reload | ||
| + | | ||
| + | |||
| + | followed by a hard browser refresh (Ctrl + Shift + R). | ||
| + | |||
| + | |||
| + | === Rollout Release === | ||
| + | |||
| + | # In deinem Produktionsverzeichnis | ||
| + | cd / | ||
| + | |||
| + | # Aktiviere Virtual Environment | ||
| + | source env/ | ||
| + | |||
| + | # Hole neueste Tags | ||
| + | git fetch --tags | ||
| + | |||
| + | # Liste verfügbare Tags auf | ||
| + | git tag -l | ||
| + | |||
| + | # Checke das gewünschte Tag aus (mit lokalem Branch, um keinen detached-head zu bekommen) | ||
| + | git checkout -b production-v1.0.0 tags/ | ||
| + | |||
| + | # Installiere/ | ||
| + | pip install -r app/ | ||
| + | |||
| + | # Führe Migrations aus (falls nötig) | ||
| + | python app/ | ||
| + | |||
| + | # Sammle Static Files | ||
| + | python app/ | ||
| + | |||
| + | # Starte Gunicorn neu | ||
| + | sudo systemctl restart gunicorn | ||
| === Tutorial === | === Tutorial === | ||
deployment_raspberry.1761844828.txt.gz · Last modified: by ninin
