Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

mainroot / ops / systemd / progmaweb-api.service

1.6 KiB · Raw · Log

# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
# SPDX-License-Identifier: AGPL-3.0-or-later

[Unit]
Description=Progmaweb account API
After=network-online.target postgresql.service
Wants=network-online.target postgresql.service

[Service]
Type=exec
User=progmaweb
Group=progmaweb
WorkingDirectory=/srv/progmaweb/current/api
# Invoke the framework-dependent deployment through the installed runtime. This
# avoids relying on the copied apphost inode being executable under the host's
# SELinux policy while preserving the same immutable application payload.
ExecStart=/usr/bin/dotnet /srv/progmaweb/current/api/Progmaweb.Api.dll
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=ASPNETCORE_URLS=http://127.0.0.1:5085
EnvironmentFile=-/etc/progmaweb/account.env
Restart=on-failure
RestartSec=5s
TimeoutStopSec=30s

# The API has no writable application files. Its state is in PostgreSQL, reached through the local Unix socket; the
# connection string is in the environment file above.
UMask=0077
AmbientCapabilities=
CapabilityBoundingSet=
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectClock=true
ProtectHome=true
ProtectHostname=true
ProtectSystem=strict
ProtectKernelLogs=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RemoveIPC=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
# MemoryDenyWriteExecute is intentionally omitted: CoreCLR's JIT requires managed executable mappings at runtime.
SystemCallArchitectures=native

[Install]
WantedBy=multi-user.target