2022-03-20 20:54:52 +01:00
|
|
|
# /etc/systemd/system/drone.service
|
2020-05-29 12:58:04 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Drone server
|
2022-09-28 16:31:01 +02:00
|
|
|
After=docker.service
|
|
|
|
Upholds=nginx.service docker.service
|
2020-05-29 12:58:04 +02:00
|
|
|
|
|
|
|
[Service]
|
2022-03-20 20:54:52 +01:00
|
|
|
Slice=drone.slice
|
2022-09-28 16:29:50 +02:00
|
|
|
Delegate=no
|
2022-09-28 16:35:26 +02:00
|
|
|
Restart=on-abnormal
|
2022-09-28 16:31:19 +02:00
|
|
|
RestartSec=15s
|
|
|
|
|
2022-09-28 16:28:38 +02:00
|
|
|
Environment=COMPOSE_FILE=/etc/drone/docker-compose.yml
|
2022-09-28 16:31:50 +02:00
|
|
|
ExecStartPre=/usr/bin/docker-compose -p drone -f /etc/drone/docker-compose.yml down
|
|
|
|
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
|
2022-03-20 20:54:52 +01:00
|
|
|
|
|
|
|
Nice=-14
|
|
|
|
IOSchedulingClass=1
|
|
|
|
IOSchedulingPriority=0
|
|
|
|
|
|
|
|
CapabilityBoundingSet=
|
2022-04-20 16:51:05 +02:00
|
|
|
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_BOOT CAP_SYS_CHROOT CAP_AUDIT_*
|
|
|
|
|
2022-09-28 16:32:40 +02:00
|
|
|
SystemCallFilter=~memfd_create @reboot @swap @cpu-emulation @debug @module @clock @raw-io @obsolete
|
2022-04-20 16:52:11 +02:00
|
|
|
ProtectProc=invisible
|
|
|
|
ProcSubset=pid
|
2022-03-20 20:54:52 +01:00
|
|
|
ProtectHome=true
|
2022-04-20 16:52:59 +02:00
|
|
|
RestrictNamespaces=true
|
2022-03-20 20:54:52 +01:00
|
|
|
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
|
2022-04-20 16:54:52 +02:00
|
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
2022-03-20 20:54:52 +01:00
|
|
|
RestrictRealtime=true
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
SystemCallArchitectures=native
|
2020-05-29 12:58:04 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2022-03-20 20:54:52 +01:00
|
|
|
|
2022-03-20 21:03:24 +01:00
|
|
|
# vim: ft=systemd
|