summarylogtreecommitdiffstats
path: root/ferretdb@.service
blob: 93aefe5ea833efbb40a6593165b7e4130b9b4641 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[Unit]
Description=FerretDB Proxy for %I
PartOf=ferretdb.target
Documentation=https://docs.ferretdb.io/
Wants=network-online.target
After=network-online.target

[Service]
Type=exec
ExecStart=/usr/bin/ferretdb
EnvironmentFile=-/etc/conf.d/ferretdb
EnvironmentFile=-/etc/conf.d/ferretdb.%i
User=ferretdb
StateDirectory=ferretdb/%i
WorkingDirectory=/var/lib/ferretdb/%i
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
ProtectHome=read-only
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes

# Configure the FerretDB service with `systemctl edit ferretdb`.
# For more configuration options check https://docs.ferretdb.io/configuration/flags/
Environment="FERRETDB_POSTGRESQL_URL=postgres://127.0.0.1:5432/ferretdb"

[Install]
WantedBy=multi-user.target