shell
pip install gunicorn
shell
pip install django
django-admin startproject myproject
cd myproject
django-admin startapp myapp
python
import multiprocessing
bind = "0.0.0.0:8000"
workers = multiprocessing.cpu_count() * 2 + 1
shell
python manage.py collectstatic
shell
gunicorn myproject.wsgi:application -c gunicorn.conf.py
shell
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8000;
}
location /static {
alias /path/to/your/static/files;
}
}