mirror of https://gitlab.com/curben/blog
post(caddy): systemd start-rate-limit in 21.03
- https://github.com/NixOS/nixpkgs/pull/97512
This commit is contained in:
parent
3fd090b561
commit
99ac6b142f
|
@ -101,6 +101,7 @@ in {
|
|||
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
|
||||
{ CADDYPATH = cfg.dataDir; };
|
||||
startLimitIntervalSec = 86400;
|
||||
# 21.03+
|
||||
# https://github.com/NixOS/nixpkgs/pull/97512
|
||||
# startLimitBurst = 5;
|
||||
serviceConfig = {
|
||||
|
@ -112,7 +113,7 @@ in {
|
|||
User = "caddyProxy";
|
||||
Group = "caddyProxy";
|
||||
Restart = "on-failure";
|
||||
# <= 20.03
|
||||
# <= 20.09
|
||||
StartLimitBurst = 5;
|
||||
NoNewPrivileges = true;
|
||||
LimitNPROC = 64;
|
||||
|
|
|
@ -80,6 +80,7 @@ in {
|
|||
environment = mkIf (versionAtLeast config.system.stateVersion "17.09" && !isCaddy2)
|
||||
{ CADDYPATH = cfg.dataDir; };
|
||||
startLimitIntervalSec = 86400;
|
||||
# 21.03+
|
||||
# https://github.com/NixOS/nixpkgs/pull/97512
|
||||
# startLimitBurst = 5;
|
||||
serviceConfig = {
|
||||
|
@ -91,7 +92,7 @@ in {
|
|||
User = "caddyProxy";
|
||||
Group = "caddyProxy";
|
||||
Restart = "on-failure";
|
||||
# <= 20.03
|
||||
# <= 20.09
|
||||
StartLimitBurst = 5;
|
||||
NoNewPrivileges = true;
|
||||
LimitNPROC = 64;
|
||||
|
|
|
@ -149,6 +149,7 @@ in {
|
|||
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
|
||||
{ CADDYPATH = cfg.dataDir; };
|
||||
startLimitIntervalSec = 86400;
|
||||
# 21.03+
|
||||
# https://github.com/NixOS/nixpkgs/pull/97512
|
||||
# startLimitBurst = 5;
|
||||
serviceConfig = {
|
||||
|
@ -160,7 +161,7 @@ in {
|
|||
User = "caddyProxy";
|
||||
Group = "caddyProxy";
|
||||
Restart = "on-failure";
|
||||
# <= 20.03
|
||||
# <= 20.09
|
||||
StartLimitBurst = 5;
|
||||
NoNewPrivileges = true;
|
||||
LimitNPROC = 64;
|
||||
|
|
|
@ -124,6 +124,7 @@ in {
|
|||
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
|
||||
{ CADDYPATH = cfg.dataDir; };
|
||||
startLimitIntervalSec = 86400;
|
||||
# 21.03+
|
||||
# https://github.com/NixOS/nixpkgs/pull/97512
|
||||
# startLimitBurst = 5;
|
||||
serviceConfig = {
|
||||
|
@ -135,7 +136,7 @@ in {
|
|||
User = "caddyProxy";
|
||||
Group = "caddyProxy";
|
||||
Restart = "on-failure";
|
||||
# <= 20.03
|
||||
# <= 20.09
|
||||
StartLimitBurst = 5;
|
||||
NoNewPrivileges = true;
|
||||
LimitNPROC = 64;
|
||||
|
|
Loading…
Reference in New Issue