2
0
Fork 0
bookwyrm/contrib/systemd/bookwyrm.service

35 lines
859 B
SYSTEMD
Raw Normal View History

[Unit]
Description=BookWyrm
After=network.target postgresql.service redis.service
[Service]P
User=bookwyrm
Group=bookwyrm
2023-08-19 12:02:04 +02:00
WorkingDirectory=/opt/bookwyrm
2023-08-20 10:26:44 +10:00
ExecStart=/opt/bookwyrm/venv/bin/gunicorn bookwyrm.wsgi:application --threads=8 --bind 0.0.0.0:8000
StandardOutput=journal
StandardError=inherit
2023-08-19 12:02:04 +02:00
ProtectSystem=strict
ProtectHome=tmpfs
InaccessiblePaths=-/media -/mnt -/srv
PrivateTmp=yes
TemporaryFileSystem=/var /run /opt
PrivateUsers=true
PrivateDevices=true
BindReadOnlyPaths=/opt/bookwyrm
BindPaths=/opt/bookwyrm/images /opt/bookwyrm/static /var/run/postgresql
LockPersonality=yes
MemoryDenyWriteExecute=true
PrivateMounts=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictNamespaces=net
[Install]
WantedBy=multi-user.target