23 lines
744 B
Plaintext
23 lines
744 B
Plaintext
[Unit]
|
|
Description=mastodon-web
|
|
Requires=redis@6379.service
|
|
After=redis@6379.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=<%= @user %>
|
|
PIDFile=<%= @app_dir %>/tmp/puma.pid
|
|
WorkingDirectory=<%= @app_dir %>
|
|
Environment="RAILS_ENV=production"
|
|
Environment="BIND=<%= @bind %>"
|
|
Environment="PORT=<%= @port %>"
|
|
Environment="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
|
|
ExecStart=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid
|
|
ExecStop=<%= @bundle_path %> exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid stop
|
|
ExecReload=<%= @bundle_path %> exec pumactl -F config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid phased-restart
|
|
TimeoutSec=15
|
|
Restart=always
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|