Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/ops/systemd/xsharp-web-api.service
blob: e7826cf2b798831c0168c79f54906af582961199 (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
40
41
42
43
44
45
46
47
48
49
50
# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.0

[Unit]
Description=Visual X# website and registry API
After=network-online.target postgresql.service postfix.service
Wants=network-online.target

[Service]
Type=simple
User=xsharp_web
Group=xsharp_web
WorkingDirectory=/srv/xsharp/website/current/backend
ExecStart=/usr/bin/env /srv/xsharp/website/current/backend/XSharp.Web.Api
EnvironmentFile=/etc/xsharp/web-api.env
Environment=ASPNETCORE_URLS=http://127.0.0.1:5080
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_EnableDiagnostics=0
Environment=DataProtection__Path=/var/lib/xsharp-web/keys
Environment=DataProtection__CertificatePath=%d/dataprotection.pfx
LoadCredential=dataprotection.pfx:/etc/xsharp/dataprotection.pfx
StateDirectory=xsharp-web
Restart=on-failure
RestartSec=3s
TimeoutStopSec=15s
UMask=0077

AmbientCapabilities=
CapabilityBoundingSet=
LockPersonality=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
RemoveIPC=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native

[Install]
WantedBy=multi-user.target