Blame

1cab18 Niklas Polke 2026-08-04 22:42:00
Create GUNICORN Deployment
1
# GUNICORN Deployment
2
3
```bash=
4
source .venv/bin/activate
5
python manage.py migrate
6
python manage.py collectstatic
7
sudo systemctl restart gunicorn
8
sudo systemctl reload nginx
9
```
10
1. activate python virtual environment for next calls of python
11
2. change database model if needed by executing migrations
12
3. copies static files to STATIC_ROOT (defined in settings.py) to which **gunicorn** looks and to which **nginx** has to look at
13
4. restarts gunicorn to update the server (needed, if code has changed - not if only staticfiles changed)
14
5. reloads nginx configuration (only needed, if nginx configuration changed)