diff options
Diffstat (limited to 'roles/subdap/templates')
-rw-r--r-- | roles/subdap/templates/accountservice.py.j2 | 4 | ||||
-rw-r--r-- | roles/subdap/templates/subdap.service.j2 | 24 |
2 files changed, 28 insertions, 0 deletions
diff --git a/roles/subdap/templates/accountservice.py.j2 b/roles/subdap/templates/accountservice.py.j2 new file mode 100644 index 0000000..2f6e8f1 --- /dev/null +++ b/roles/subdap/templates/accountservice.py.j2 @@ -0,0 +1,4 @@ +import xmlrpclib + +url = '{{ subdap_accountservice_url }}' +accountservice = xmlrpclib.ServerProxy(url) diff --git a/roles/subdap/templates/subdap.service.j2 b/roles/subdap/templates/subdap.service.j2 new file mode 100644 index 0000000..068570d --- /dev/null +++ b/roles/subdap/templates/subdap.service.j2 @@ -0,0 +1,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 |