51 lines
1.2 KiB
SYSTEMD
51 lines
1.2 KiB
SYSTEMD
# /etc/systemd/system/drone.service
|
|
[Unit]
|
|
Description=Drone server
|
|
After=docker.service
|
|
Upholds=nginx.service docker.service
|
|
|
|
[Service]
|
|
Slice=drone.slice
|
|
Delegate=no
|
|
Restart=always
|
|
RestartSec=5
|
|
Environment=COMPOSE_FILE=/etc/drone/docker-compose.yml
|
|
ExecStart=/usr/bin/docker-compose -p drone -f ${COMPOSE_FILE} up --remove-orphans
|
|
ExecStop=/usr/bin/docker-compose -p drone -f ${COMPOSE_FILE} 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
|