server: configure woodpecker
This commit is contained in:
parent
987ecdc1ab
commit
d2e7ad4743
@ -25,37 +25,39 @@
|
||||
};
|
||||
};
|
||||
|
||||
woodpecker-server = {
|
||||
description = "CI/CD Pipeline Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "postgresql.service" ];
|
||||
requires = [ "postgresql.service" ];
|
||||
script = "${pkgs.woodpecker-server}/bin/woodpecker-server --server-host https://woodpecker.kabtop.de --server-addr localhost:8000 ";
|
||||
# --environment ${config.age.secrets."services/woodpecker/environment.yml".path}";
|
||||
serviceConfig = {
|
||||
User = "woodpecker";
|
||||
Group = "woodpecker";
|
||||
Environment = "HOME=/var/lib/woodpecker";
|
||||
ReadWritePaths="/var/log/woodpecker";
|
||||
NoNewPrivileges=true;
|
||||
MemoryDenyWriteExecute=true;
|
||||
PrivateDevices=true;
|
||||
PrivateTmp=true;
|
||||
ProtectHome=true;
|
||||
ProtectSystem="strict";
|
||||
ProtectControlGroups=true;
|
||||
RestrictSUIDSGID=true;
|
||||
RestrictRealtime=true;
|
||||
LockPersonality=true;
|
||||
ProtectKernelLogs=true;
|
||||
ProtectKernelTunables=true;
|
||||
ProtectHostname=true;
|
||||
ProtectKernelModules=true;
|
||||
PrivateUsers=true;
|
||||
ProtectClock=true;
|
||||
SystemCallArchitectures="native";
|
||||
SystemCallErrorNumber="EPERM";
|
||||
SystemCallFilter="@system-service";
|
||||
systemd.services = {
|
||||
woodpecker-server = {
|
||||
description = "CI/CD Pipeline Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "postgresql.service" ];
|
||||
requires = [ "postgresql.service" ];
|
||||
script = "${pkgs.woodpecker-server}/bin/woodpecker-server";
|
||||
serviceConfig = {
|
||||
User="woodpecker";
|
||||
Group="woodpecker";
|
||||
Environment="HOME=/var/lib/woodpecker";
|
||||
EnvironmentFile=config.age.secrets."services/woodpecker/environment".path;
|
||||
ReadWritePaths="/var/lib/woodpecker /var/log/woodpecker";
|
||||
NoNewPrivileges=true;
|
||||
MemoryDenyWriteExecute=true;
|
||||
PrivateDevices=true;
|
||||
PrivateTmp=true;
|
||||
ProtectHome=true;
|
||||
ProtectSystem="strict";
|
||||
ProtectControlGroups=true;
|
||||
RestrictSUIDSGID=true;
|
||||
RestrictRealtime=true;
|
||||
LockPersonality=true;
|
||||
ProtectKernelLogs=true;
|
||||
ProtectKernelTunables=true;
|
||||
ProtectHostname=true;
|
||||
ProtectKernelModules=true;
|
||||
PrivateUsers=true;
|
||||
ProtectClock=true;
|
||||
SystemCallArchitectures="native";
|
||||
SystemCallErrorNumber="EPERM";
|
||||
SystemCallFilter="@system-service";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -70,7 +72,7 @@
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"woodpecker.kabtop.de" = {
|
||||
"ci.kabtop.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://localhost:8000";
|
||||
@ -78,10 +80,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
# age.secrets."services/woodpecker/dbpassFile" = {
|
||||
# file = ../../../secrets/services/nextcloud/dbpassFile.age;
|
||||
# owner = "nextcloud";
|
||||
# };
|
||||
age.secrets."services/woodpecker/environment" = {
|
||||
file = ../../../secrets/services/woodpecker/environment.age;
|
||||
owner = "woodpecker";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -44,4 +44,5 @@ in
|
||||
"services/nextcloud/dbpassFile.age".publicKeys = servers ++ users;
|
||||
"services/gitea/databasePassword.age".publicKeys = servers ++ users;
|
||||
"services/gitea/mailerPassword.age".publicKeys = servers ++ users;
|
||||
"services/woodpecker/environment.age".publicKeys = servers ++ users;
|
||||
}
|
||||
|
BIN
secrets/services/woodpecker/environment.age
Normal file
BIN
secrets/services/woodpecker/environment.age
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user