garage44.eu/jeroen/midas

logclone: git clone https://garage44.eu/jeroen/midas.git

.. /units/midas-deploy.service

raw

[Unit]
Description=midas deploy (build queued deploys on nodes, as the hub's user)
After=network-online.target midas-hub.service

[Service]
Type=oneshot
User=midas
Group=midas
Environment=HOME=/srv/midas
ExecStart=/usr/local/bin/midas hub deploy-build
TimeoutStartSec=4h
UMask=0022
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/srv/midas
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
# No RestrictSUIDSGID: systemd enforces it with a filter that answers ENOSYS to
# openat2, which it cannot inspect, and GNU tar 1.35 then cannot extract a file
# at all ("Cannot open: Function not implemented") — the first deploy's
# artifacts never arrived. Modes are root's to set anyway: publishing gives
# every file 0644 or 0755.
CapabilityBoundingSet=
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
MemoryMax=512M