To create a systemd
command for a Django server using Gunicorn
to serve the project over some port, follow these steps:
-
Create a gunicorn configuration file. In your project directory, create a file named
gunicorn.py
with the following contents:bind = "0.0.0.0:8000" workers = 4
-
Install
Gunicorn
in your project environment if not yet installed.