24 lines
555 B
Django/Jinja
24 lines
555 B
Django/Jinja
[Unit]
|
|
Description=mastodon-web
|
|
After=network.target
|
|
PartOf={{service}}.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{service}}
|
|
Group={{service}}
|
|
UMask=0027
|
|
WorkingDirectory=/home/{{service}}/mastodon/
|
|
Environment="RAILS_ENV=production"
|
|
Environment="PORT={{puma_port|default('3000')}}"
|
|
Environment="RAILS_LOG_LEVEL=warn"
|
|
Environment="LD_PRELOAD=libjemalloc.so"
|
|
ExecStart=/home/{{service}}/.rbenv/shims/bundle exec puma -C config/puma.rb
|
|
ExecReload=/bin/kill -SIGUSR1 $MAINPID
|
|
TimeoutSec=15
|
|
Restart=always
|
|
SyslogIdentifier=%p
|
|
|
|
[Install]
|
|
WantedBy={{service}}.target
|