2018-09-24 17:46:05 +03:00
|
|
|
[Unit]
|
|
|
|
Description=mastodon-sidekiq
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
User=mastodon
|
|
|
|
WorkingDirectory=/home/mastodon/live
|
|
|
|
Environment="RAILS_ENV=production"
|
|
|
|
Environment="DB_POOL=25"
|
|
|
|
Environment="MALLOC_ARENA_MAX=2"
|
2021-07-05 20:16:35 +03:00
|
|
|
Environment="LD_PRELOAD=libjemalloc.so"
|
2018-09-24 17:46:05 +03:00
|
|
|
ExecStart=/home/mastodon/.rbenv/shims/bundle exec sidekiq -c 25
|
|
|
|
TimeoutSec=15
|
|
|
|
Restart=always
|
2021-10-25 17:31:20 +03:00
|
|
|
# Proc filesystem
|
|
|
|
ProcSubset=pid
|
|
|
|
ProtectProc=invisible
|
2021-03-24 11:46:13 +02:00
|
|
|
# Capabilities
|
|
|
|
CapabilityBoundingSet=
|
|
|
|
# Security
|
|
|
|
NoNewPrivileges=true
|
|
|
|
# Sandboxing
|
|
|
|
ProtectSystem=strict
|
|
|
|
PrivateTmp=true
|
|
|
|
PrivateDevices=true
|
|
|
|
PrivateUsers=true
|
|
|
|
ProtectHostname=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
RestrictAddressFamilies=AF_INET
|
|
|
|
RestrictAddressFamilies=AF_INET6
|
|
|
|
RestrictAddressFamilies=AF_NETLINK
|
|
|
|
RestrictAddressFamilies=AF_UNIX
|
|
|
|
RestrictNamespaces=true
|
|
|
|
LockPersonality=true
|
|
|
|
RestrictRealtime=true
|
|
|
|
RestrictSUIDSGID=true
|
2021-10-25 17:31:20 +03:00
|
|
|
RemoveIPC=true
|
2021-03-24 11:46:13 +02:00
|
|
|
PrivateMounts=true
|
|
|
|
ProtectClock=true
|
|
|
|
# System Call Filtering
|
|
|
|
SystemCallArchitectures=native
|
2021-10-25 17:31:20 +03:00
|
|
|
SystemCallFilter=~@cpu-emulation @debug @keyring @ipc @mount @obsolete @privileged @setuid
|
|
|
|
SystemCallFilter=@chown
|
|
|
|
SystemCallFilter=pipe
|
|
|
|
SystemCallFilter=pipe2
|
2021-12-22 05:34:12 +02:00
|
|
|
ReadWritePaths=/home/mastodon/live
|
2018-09-24 17:46:05 +03:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|