User Tools

Site Tools


aufsetzen_raspberry_lokal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
aufsetzen_raspberry_lokal [2026/06/12 21:27] nininaufsetzen_raspberry_lokal [2026/06/12 21:52] (current) ninin
Line 82: Line 82:
 ====15. Static Files==== ====15. Static Files====
   python manage.py collectstatic   python manage.py collectstatic
 +
 +Rechte für Nginx auf das staticfiles-Verzeichnis vergeben:
 +  sudo chown -R :www-data [...]/sese_project/serious-seeds/app/staticfiles/
 +  sudo chmod -R 755 [...]/sese_project/serious-seeds/app/staticfiles/
 +  sudo chmod o+x /home/[SYSTEMUSER]
      
 ====16. Nginx==== ====16. Nginx====
Line 96: Line 101:
      
       location / {       location / {
-          proxy_pass http://unix:/run/gunicorn.sock:/;+          proxy_pass http://unix:/run/gunicorn/gunicorn.sock:/;
           proxy_set_header Host $host;           proxy_set_header Host $host;
           proxy_set_header X-Real-IP $remote_addr;           proxy_set_header X-Real-IP $remote_addr;
Line 116: Line 121:
  
 ====17. Gunicorn==== ====17. Gunicorn====
 +  
 +
   sudo nano /etc/systemd/system/gunicorn.service   sudo nano /etc/systemd/system/gunicorn.service
  
Line 127: Line 134:
   User=[SYSTEMUSER]   User=[SYSTEMUSER]
   Group=www-data   Group=www-data
 +  RuntimeDirectory=gunicorn
   WorkingDirectory=[...]/sese_project/serious-seeds/app   WorkingDirectory=[...]/sese_project/serious-seeds/app
-  ExecStart=[...]/sese_project/serious-seeds/env/bin/gunicorn --workers 5 --threads 2 --timeout 60 --max-requests 1000 --max-requests-jitter 100 --bind unix:/run/gunicorn.sock seriousseeds.wsgi:application+  ExecStart=[...]/sese_project/serious-seeds/env/bin/gunicorn --workers 5 --threads 2 --timeout 60 --max-requests 1000 --max-requests-jitter 100 --bind unix:/run/gunicorn/gunicorn.sock seriousseeds.wsgi:application
      
   [Install]   [Install]
   WantedBy=multi-user.target   WantedBy=multi-user.target
 +
 +Start and enable the service:
 +  sudo systemctl start gunicorn
 +  sudo systemctl enable gunicorn
aufsetzen_raspberry_lokal.1781299637.txt.gz · Last modified: by ninin