summaryrefslogtreecommitdiff
path: root/roles/subdap/templates/subdap.service.j2
blob: 068570d3b2199dbfdde935cafccdabfbf50b6217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[Unit]
Description=subdap ldap frontend application server
After=network.target

[Service]
PIDFile=/var/subdap/gunicorn.pid
User=subdap
Group=subdap
WorkingDirectory=/var/subdap/src
Environment=VIRTUAL_ENV="/var/subdap/venv"
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
ExecStart=/var/subdap/venv/bin/gunicorn \
                   --pid /var/subdap/gunicorn.pid \
                   --log-syslog \
                   --max-requests 1000 \
                   -w 10 -t 120 \
                   -b 127.0.0.1:8001 \
                   index
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target