drone-ci-configs/drone.service

48 lines
1.1 KiB
SYSTEMD
Raw Normal View History

# /etc/systemd/system/drone.service
2020-05-29 12:58:04 +02:00
[Unit]
Description=Drone server
After=docker.service nginx.service
[Service]
Slice=drone.slice
Delegate=yes
2020-05-29 12:58:04 +02:00
Restart=always
RestartSec=5
ExecStart=/usr/bin/docker-compose -p drone -f /etc/drone/docker-compose.yml up
ExecStop=/usr/bin/docker-compose -p drone -f /etc/drone/docker-compose.yml stop
Nice=-14
IOSchedulingClass=1
IOSchedulingPriority=0
CapabilityBoundingSet=
# ProtectProc=invisible
ProtectHome=true
RestrictNamespaces=uts ipc pid user cgroup
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
RestrictRealtime=true
RestrictSUIDSGID=true
# SystemCallFilter=~memfd_create
SystemCallArchitectures=native
2020-05-29 12:58:04 +02:00
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/drone.service.d/override.conf
# drone service override
# [Unit]
# OnFailure=status_email_wanderer@%n