suever / honcho-export-systemd

systemd export support for Honcho

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systemd exporter for Honcho

##Installation

$ pip install honcho-export-systemd

##Usage Assuming you have a Procfile with the following contents:

web: python app.py
$ honcho export -a app -d /home/app -u app systemd /usr/lib/systemd/system

produces the following systemd service files:

# app.target
[Unit]
StopWhenUnneeded=true
Wants=app-web.target

[Install]
WantedBy=multi-user.target
# app-web.target
[Unit]
StopWhenUnneeded=true
Wants=app-web-1.service
# app-web-1.service
[Unit]
StopWhenUnneeded=true

[Service]
User=app
WorkingDirectory=/home/app
Environment=PORT=5000
ExecStart=/bin/sh -c 'python app.py'
Restart=always
StandardInput=null
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n

About

systemd export support for Honcho

License:Apache License 2.0


Languages

Language:Python 100.0%