Difference between revisions of "Gunicorn"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) (Created page with "= Gunicorn service file = <nowiki>[Unit] Description=Fotingo Gunicorn Service After=network.target [Service] User=rra Group=rra WorkingDirectory=/home/rra/Fotingo StandardOu...") |
Rafahsolis (talk | contribs) |
||
| Line 1: | Line 1: | ||
= Gunicorn service file = | = Gunicorn service file = | ||
<nowiki>[Unit] | <nowiki>[Unit] | ||
| − | Description= | + | Description=Gunicorn Service |
After=network.target | After=network.target | ||
[Service] | [Service] | ||
| − | User= | + | User=ubuntu |
| − | Group= | + | Group=ubuntu |
| − | WorkingDirectory=/home/ | + | WorkingDirectory=/home/ubuntu/project |
StandardOutput=syslog | StandardOutput=syslog | ||
StandardError=syslog | StandardError=syslog | ||
| − | SyslogIdentifier= | + | SyslogIdentifier=gunicorn |
Restart=always | Restart=always | ||
RestartSec=3 | RestartSec=3 | ||
| − | Environment=DJANGO_SETTINGS_MODULE= | + | Environment=DJANGO_SETTINGS_MODULE=project.settings.prod |
| − | ExecStart=/home/rra/.virtualenvs/ | + | ExecStart=/home/rra/.virtualenvs/project/bin/gunicorn -w3 --timeout 300 --access-logfile /var/log/gunicorn/access.log --error-logfile /var/log/gunicorn/error.log --bind unix:/home/ubuntu/porject/project.sock project.wsgi |
[Install] | [Install] | ||
| Line 20: | Line 20: | ||
== SSL == | == SSL == | ||
| − | ExecStart= | + | ExecStart=gunicorn -w 5 --certfile=/etc/ssl/certs/kaio.dyndns.org.crt --keyfile=/etc/ssl/private/www.example.com.key --access-logfile=/var/log/gunicorn/access.log --error-logfile=/var/log/gunicorn/error.log --bind=0.0.0.0:50538 project.wsgi |
Latest revision as of 08:26, 17 December 2018
Gunicorn service file[edit]
[Unit] Description=Gunicorn Service After=network.target [Service] User=ubuntu Group=ubuntu WorkingDirectory=/home/ubuntu/project StandardOutput=syslog StandardError=syslog SyslogIdentifier=gunicorn Restart=always RestartSec=3 Environment=DJANGO_SETTINGS_MODULE=project.settings.prod ExecStart=/home/rra/.virtualenvs/project/bin/gunicorn -w3 --timeout 300 --access-logfile /var/log/gunicorn/access.log --error-logfile /var/log/gunicorn/error.log --bind unix:/home/ubuntu/porject/project.sock project.wsgi [Install] WantedBy=multi-user.target
SSL[edit]
ExecStart=gunicorn -w 5 --certfile=/etc/ssl/certs/kaio.dyndns.org.crt --keyfile=/etc/ssl/private/www.example.com.key --access-logfile=/var/log/gunicorn/access.log --error-logfile=/var/log/gunicorn/error.log --bind=0.0.0.0:50538 project.wsgi