26 lines
759 B
Django/Jinja
26 lines
759 B
Django/Jinja
[Unit]
|
|
# You can create multiple unicorn service by linking unicorn@.service to unicorn@appone.service, unicorn@apptwo.service
|
|
# each application reads its settings from /etc/default/unicorn_appone, /etc/default/unicorn_apptwo
|
|
Description=Unicorn serving %I app
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
Type=forking
|
|
User={{ redmine_user }}
|
|
Group={{ redmine_group }}
|
|
WorkingDirectory=/srv/redmine/%I
|
|
EnvironmentFile=/etc/default/unicorn_%I
|
|
SyslogIdentifier=unicorn-%I
|
|
PIDFile={{ unicorn_pid_file }}
|
|
KillMode=mixed
|
|
KillSignal=SIGQUIT
|
|
ExecStart=/usr/bin/bundle exec "${DAEMON} ${DAEMON_OPTS}"
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
TimeoutSec=30
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|