[Unit]
Description=AWOOOI controlled CD lane drain
After=network-online.target docker.service
Wants=network-online.target
Requires=docker.service
ConditionPathExists=/home/wooo/awoooi-cd-lane-drain/data/.runner

[Service]
Type=simple
User=wooo
WorkingDirectory=/home/wooo/awoooi-cd-lane-drain/data
Environment=HOME=/home/wooo
Environment=AWOOOI_CONTROLLED_RUNNER_OPEN=1
Environment=HOST_WEB_BUILD_PRESSURE_ATTEMPTS=1
Environment=HOST_WEB_BUILD_PRESSURE_SLEEP_SECONDS=1
ExecStart=/home/wooo/awoooi-cd-lane-drain/awoooi_cd_lane_controlled daemon --config /home/wooo/awoooi-cd-lane-drain/config.yaml
Restart=always
RestartSec=10
KillSignal=SIGINT
TimeoutStopSec=3700
SuccessExitStatus=0 130 143
CPUAccounting=true
CPUQuota=250%
MemoryAccounting=true
MemoryHigh=8G
MemoryMax=12G
TasksAccounting=true
TasksMax=512
IOAccounting=true
IOWeight=100
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target
