This uses the ruby_build provider for Mastodon, installing Ruby 2.4.1 currently. It also updates some other cookbooks and the runlists.
24 lines
821 B
Plaintext
24 lines
821 B
Plaintext
[Unit]
|
|
Description=mastodon-web
|
|
Requires=redis-server.service
|
|
After=redis-server.service
|
|
Requires=postgresql@9.4-main.service
|
|
After=postgresql@9.4-main.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=<%= @user %>
|
|
PIDFile=<%= @app_dir %>/tmp/puma.pid
|
|
WorkingDirectory=<%= @app_dir %>
|
|
Environment="RAILS_ENV=production"
|
|
Environment="PORT=3000"
|
|
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
|
|
ExecRestart=<%= @bundle_path %> exec pumactl -F config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid restart
|
|
TimeoutSec=15
|
|
Restart=always
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|