summaryrefslogtreecommitdiffstats
path: root/SUSE/takahe.service
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2022-12-18 16:46:54 +0100
committerGeorg Pfuetzenreuter2022-12-18 16:46:54 +0100
commit9501cbf678a4ef99ccbd8c53f35b3209569f4c8e (patch)
tree29ea371a405197037d120a8d9848971a547de227 /SUSE/takahe.service
parent86bc48f3e0b57bd63673324c1177e93da806de7a (diff)
downloadtakahe-9501cbf678a4ef99ccbd8c53f35b3209569f4c8e.tar.gz
takahe-9501cbf678a4ef99ccbd8c53f35b3209569f4c8e.tar.bz2
takahe-9501cbf678a4ef99ccbd8c53f35b3209569f4c8e.zip
Import packaging fileslibertacasa-package
- setup.py to install the library as a Python package - systemd services and target for running as a daemon - sysconfig file providing environment variables to the application Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'SUSE/takahe.service')
-rw-r--r--SUSE/takahe.service30
1 files changed, 30 insertions, 0 deletions
diff --git a/SUSE/takahe.service b/SUSE/takahe.service
new file mode 100644
index 0000000..dd7d395
--- /dev/null
+++ b/SUSE/takahe.service
@@ -0,0 +1,30 @@
+# This file is shipped as part of the Takahe package.
+# Author: Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
+
+[Unit]
+Description=Takahe
+After=postgresql.service
+Wants=postgresql.service
+PartOf=%N.target
+
+[Service]
+User=_%N
+Group=_%N
+
+EnvironmentFile=/etc/sysconfig/%N
+ExecStart=/usr/bin/gunicorn %N.%N.wsgi:application -b "$BIND"
+
+PrivateDevices=yes
+PrivateTmp=yes
+ProtectControlGroups=yes
+ProtectHome=yes
+ProtectKernelLogs=yes
+ProtectSystem=strict
+RestrictAddressFamilies=AF_INET6 AF_INET AF_UNIX
+SystemCallArchitectures=native
+SystemCallFilter=@system-service
+
+ReadWritePaths=/srv/%N/media
+
+[Install]
+WantedBy=multi-user.target