summarylogtreecommitdiffstats
path: root/asciinema-sidekiq.service
diff options
context:
space:
mode:
Diffstat (limited to 'asciinema-sidekiq.service')
-rw-r--r--asciinema-sidekiq.service32
1 files changed, 32 insertions, 0 deletions
diff --git a/asciinema-sidekiq.service b/asciinema-sidekiq.service
new file mode 100644
index 000000000000..cbeb775f5d9a
--- /dev/null
+++ b/asciinema-sidekiq.service
@@ -0,0 +1,32 @@
+[Unit]
+Description=Asciinema Sidekiq Server
+Requires=redis.service asciinema-unicorn.service
+Wants=postgresql.service
+After=redis.service postgresql.service asciinema-unicorn.service
+JounsNamespaceOf=asciinema-unicorn.service
+
+[Service]
+ExecStart=/usr/bin/bundle exec sidekiq -e production $SIDEKIQ_OPTS
+ExecStop=/usr/bin/bundle exec sidekiqctl stop /run/asciinema/sidekiq.pid
+
+WorkingDirectory=/usr/share/webapps/asciinema
+Evironment=RAILS_ENV=production
+EnvironmentFile=-/etc/conf.d/asciinema
+
+Restart=on-failur
+RestartSec=3
+PIDFile=/run/asciinema/sidekiq.pid
+
+User=asciinema
+Group=asciinema
+
+CapabilityBoundingSet=
+ProtectDevices=true
+ProtectSystem=full
+ProtectHome=true
+
+RuntimeDirectory=asciinema
+RuntimeDirectoryMode=755
+
+[Install]
+WantedBy=multi-user.target