morphit/ops/systemd/morphit-compose-monitor.service

42 lines
1.1 KiB
Desktop File

[Unit]
Description=Morphit Docker Compose monitor — service health + restart loops
Documentation=https://git.agorise.net/agorise/morphit
After=network-online.target docker.service
[Service]
Type=oneshot
# Needs Docker daemon access.
User=root
Group=root
EnvironmentFile=-/etc/morphit/compose-monitor.env
ExecStart=/opt/morphit/ops/scripts/morphit-compose-monitor.sh
# ─── Hardening ─────────────────────────────────────────────────
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
NoNewPrivileges=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
ProtectClock=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=true
LimitCORE=0
# Docker daemon socket is UNIX-only; no IP networking needed.
PrivateNetwork=true
RestrictAddressFamilies=AF_UNIX
CapabilityBoundingSet=
AmbientCapabilities=
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
[Install]
WantedBy=multi-user.target