pydelion.com

trac deployment with gunicorn and systemd in Fedora 17

gunicorn installation:

yum install python-gunicorn.noarch

Put systemd unit file to /lib/systemd/system/gunicorn-trac.service:

[Unit]
Description=gunicorn-trac

[Service]
ExecStart=/usr/bin/gunicorn -D -n gunicorn-trac -w5 tracwsgi:application -b 127.0.0.1:8000 --access-logfile /home/trac/log/access.log --error-logfile /home/trac/log/error.log
Type=forking
User=trac
Group=trac
Restart=always
StandardOutput=syslog
StandardError=syslog
WorkingDirectory = /home/trac/

[Install]
WantedBy=multi-user.target

Enabling, starting:

systemctl enable gunicorn-trac
systemctl start gunicorn-trac

Checking:

[root@moonstation ~]# netstat -lpn | grep gun
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 1034/gunicorn: maste
[root@moonstation ~]#

Everything seems fine. Now we can proceed with nginx setup as frontend to trac.

Exit mobile version