Serve a Django application using Gunicorn
Create systemd service file vi /usr/lib/systemd/system/backend.service Add [Unit] Description=Gunicorn instance to serve Django Application After=network.target [Service] User=www-data Group=www-data Environment=”APP=app” WorkingDirectory=/path/to/app/backend Environment=”PATH=/path/to/app/backend/venv/bin” ExecStart=/path/to/app/backend/venv/bin/gunicorn -w 3 –timeout 120 –bind 0.0.0.0:8080 backend.wsgi [Install] WantedBy=multi-user.target On the above, you need to replace “/path/to/app/backend” with the path to your application. In backend.wsgi, backend is the application name here, change it … Read more