Деплой джанги по туториалу
https://www.digitalocean.com/community/tutorials/h...
Загвоздка - после создания и настройки gunicorn.service в (/etc/systemd/system/)
gunicorn.service
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=splitpoint
Group=www-data
WorkingDirectory=/opt/blog/
ExecStart=/opt/blog/venv/bin/gunicorn --workers 3 --bind unix:/opt/blog/myproject
[Install]
WantedBy=multi-user.target
Структура проекта:
s@debian:/opt/blog$ tree
.
├── myproject
│ ├── manage.py
│ ├── myproject
│ │ ├── gunicorn.config.py
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── settings.py
│ │ ├── settings.pyc
│ │ ├── urls.py
│ │ └── wsgi.py
│ └── static
│ └── admin
│ ├── css
│ etc
└── venv
├── bin
│ ├── activate
etc
После
sudo systemctl start gunicorn
sudo systemctl enable gunicorn
sudo systemctl status gunicorn
Получаю
● gunicorn.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled)
Active: failed (Result: exit-code) since Sat 2017-05-13 11:47:49 MSK; 29s ago
Main PID: 56584 (code=exited, status=203/EXEC)
May 13 11:47:49 debian systemd[1]: Starting gunicorn daemon...
May 13 11:47:49 debian systemd[1]: Started gunicorn daemon.
May 13 11:47:49 debian systemd[56584]: Failed at step EXEC spawning /opt/bl...ry
May 13 11:47:49 debian systemd[1]: gunicorn.service: main process exited, c...EC
May 13 11:47:49 debian systemd[1]: Unit gunicorn.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Как фиксить?