debian/examples/gunicorn-mysite.service
raw| 1 | [Unit] |
| 2 | Description=gunicorn-mysite |
| 3 | After=network.target |
| 4 | |
| 5 | [Install] |
| 6 | WantedBy=multi-user.target |
| 7 | |
| 8 | [Service] |
| 9 | User=gunicorn-mysite |
| 10 | Group=gunicorn-mysite |
| 11 | Restart=always |
| 12 | |
| 13 | ExecStart=/usr/bin/gunicorn --workers=4 --log-level=debug mysite.wsgi |
| 14 | ExecReload=/bin/kill -s HUP $MAINPID |
| 15 | ExecStop=/bin/kill -s TERM $MAINPID |
| 16 | |
| 17 | WorkingDirectory=/path/to/mysite |
| 18 | Environment=PYTHONPATH='/path/to/mysite' |
| 19 | |
| 20 | PrivateTmp=true |