summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2017-04-11 17:01:43 +0300
committerCaleb Maclennan2017-04-11 17:01:43 +0300
commit13dec54f2012f372ed0bbc76c279e5ac4ccda099 (patch)
treebf6bfb89550b6c5c0361b17e3601c517445677d8
parent2ac4e3c19ed6d14a533423d6ac96b8d7b30f81e6 (diff)
downloadaur-13dec54f2012f372ed0bbc76c279e5ac4ccda099.tar.gz
Add systemd service files as found in production guide
-rw-r--r--mastodon-sidekiq.service16
-rw-r--r--mastodon-streaming.service16
-rw-r--r--mastodon-web.service16
3 files changed, 48 insertions, 0 deletions
diff --git a/mastodon-sidekiq.service b/mastodon-sidekiq.service
new file mode 100644
index 000000000000..7d1e3d48c73f
--- /dev/null
+++ b/mastodon-sidekiq.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=mastodon-sidekiq
+After=network.target
+
+[Service]
+Type=simple
+User=mastodon
+WorkingDirectory=/home/mastodon/live
+Environment="RAILS_ENV=production"
+Environment="DB_POOL=5"
+ExecStart=/home/mastodon/.rbenv/shims/bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push
+TimeoutSec=15
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mastodon-streaming.service b/mastodon-streaming.service
new file mode 100644
index 000000000000..72be21bc914a
--- /dev/null
+++ b/mastodon-streaming.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=mastodon-streaming
+After=network.target
+
+[Service]
+Type=simple
+User=mastodon
+WorkingDirectory=/home/mastodon/live
+Environment="NODE_ENV=production"
+Environment="PORT=4000"
+ExecStart=/usr/bin/npm run start
+TimeoutSec=15
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mastodon-web.service b/mastodon-web.service
new file mode 100644
index 000000000000..fc545686e265
--- /dev/null
+++ b/mastodon-web.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=mastodon-web
+After=network.target
+
+[Service]
+Type=simple
+User=mastodon
+WorkingDirectory=/home/mastodon/live
+Environment="RAILS_ENV=production"
+Environment="PORT=3000"
+ExecStart=/home/mastodon/.rbenv/shims/bundle exec puma -C config/puma.rb
+TimeoutSec=15
+Restart=always
+
+[Install]
+WantedBy=multi-user.target