Last active
December 3, 2021 20:13
-
-
Save meetsohail/a031c38790b96e1900f6004075acfa50 to your computer and use it in GitHub Desktop.
Gunicorn Configuration with Django
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Paste this service file in | |
# /etc/systemd/system | |
[Service] | |
User=user_name | |
Group=group_name | |
EnvironmentFile=/home/vars.ini | |
WorkingDirectory=/home/path_to_django_root_dir | |
Environment="PATH=/home/path_to_virtual_env_dir/bin" | |
Restart=always | |
RestartSec=3 | |
ExecStart=/home/path_to_virtual_env_dir/bin/gunicorn -c /home/path_to_root_dir_project/project_directory/gunicorn.py --workers 3 --worker-class gevent --worker-connections 1000 --worker-tmp-dir /dev/shm --bind unix:/home/path_to_root_dir_project/project_directory/rankspy.sock project_name.wsgi | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment