drone-ci-configs/drone.slice
surtur 2c3835d445
manage system access of the service using systemd
* add drone.slice (control resource usage)
* restrict can be accessed by the service
* adjust IO priority and NICEness of processes created withing the
  service
* use "-p" with docker-compose invocation to specify a project that the
  newly-spawned containers belong to (best practice)
* add commented override
2022-03-20 20:54:52 +01:00

15 lines
263 B
SYSTEMD

# /etc/systemd/system/drone.slice
[Unit]
Description=Slice that limits drone.service resources
Before=slices.target
After=docker.service docker.slice
[Slice]
CPUAccounting=yes
CPUQuota=315%
MemoryAccounting=yes
MemoryHigh=4.1G
MemoryMax=4.2G
MemorySwapMax=200M