drone-ci-configs/etc/systemd/system/drone.service

49 lines
1.2 KiB
SYSTEMD

# /etc/systemd/system/drone.service
[Unit]
Description=Drone server
After=docker.service nginx.service
[Service]
Slice=drone.slice
Delegate=yes
Restart=always
RestartSec=5
ExecStart=/usr/bin/docker-compose -p drone -f /etc/drone/docker-compose.yml up --remove-orphans
ExecStop=/usr/bin/docker-compose -p drone -f /etc/drone/docker-compose.yml stop
Nice=-14
IOSchedulingClass=1
IOSchedulingPriority=0
CapabilityBoundingSet=
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_BOOT CAP_SYS_CHROOT CAP_AUDIT_*
SystemCallFilter=~memfd_create @reboot @swap @resources @cpu-emulation @debug @module @clock @raw-io @obsolete
ProtectProc=invisible
ProcSubset=pid
ProtectHome=true
RestrictNamespaces=true
NoNewPrivileges=True
# SecureBits=noroot-locked
ProtectSystem=strict
PrivateTmp=true
PrivateDevices=true
PrivateUsers=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target
# vim: ft=systemd