forked from theforeman/puppet-foreman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add template file for [email protected] file
Fixes theforemanGH-1191
- Loading branch information
1 parent
d14ae8b
commit 38676ff
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<%- | | ||
Optional[Redis::RedisUrl] $redis_host, | ||
| -%> | ||
|
||
# This file is managed by Puppet | ||
|
||
[Unit] | ||
Description=Foreman jobs daemon - %i on sidekiq | ||
Documentation=https://theforeman.org | ||
After=network.target remote-fs.target nss-lookup.target | ||
PartOf=foreman.service | ||
|
||
[Service] | ||
Type=notify | ||
User=foreman | ||
TimeoutSec=300 | ||
PrivateTmp=true | ||
Environment=RAILS_ENV=production | ||
Environment=DYNFLOW_SIDEKIQ_SCRIPT=/usr/share/foreman/extras/dynflow-sidekiq.rb | ||
<% if $redis_host { -%> | ||
Environment=DYNFLOW_REDIS_URL=<%= $redis_host %> | ||
<% } -%> | ||
<% else { -%> | ||
Environment=DYNFLOW_REDIS_URL=redis://localhost:6379/6 | ||
<% } -%> | ||
Environment=REDIS_PROVIDER=DYNFLOW_REDIS_URL | ||
# Greatly reduce Ruby memory fragmentation and heap usage | ||
# https://www.mikeperham.com/2018/04/25/taming-rails-memory-bloat/ | ||
Environment=MALLOC_ARENA_MAX=2 | ||
WorkingDirectory=/usr/share/foreman | ||
ExecStart=/usr/libexec/foreman/sidekiq-selinux -e ${RAILS_ENV} -r ${DYNFLOW_SIDEKIQ_SCRIPT} -C /etc/foreman/dynflow/%i.yml | ||
ExecReload=/usr/bin/kill -TSTP $MAINPID | ||
|
||
SyslogIdentifier=dynflow-sidekiq@%i | ||
|
||
# if we crash, restart | ||
RestartSec=1 | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |