fix drone to podman and add dovecot secret

This commit is contained in:
2023-11-27 00:48:55 +01:00
parent 41c343c336
commit d1437de4b1
3 changed files with 28 additions and 14 deletions

View File

@@ -1,7 +1,13 @@
{ config, pkgs, ... }:
{
virtualisation.docker.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
users.users.drone-server = {
isSystemUser = true;
@@ -16,7 +22,7 @@
description = "Drone Server (CI CD Service)";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.docker ];
path = [ pkgs.podman ];
serviceConfig = {
# Type = "simple";
@@ -25,12 +31,12 @@
Group = "drone-server";
Restart = "always";
ExecStartPre= ''
-${pkgs.docker}/bin/docker stop %n \
-${pkgs.docker}/bin/docker rm %n \
${pkgs.docker}/bin/docker pull drone/drone:2.20.0
-${pkgs.podman}/bin/podman stop %n \
-${pkgs.podman}/bin/podman rm %n \
${pkgs.podman}/bin/podman pull drone/drone:2.20.0
'';
ExecStart= ''
${pkgs.docker}/bin/docker run --rm --name %n \
${pkgs.podman}/bin/podman run --rm --name %n \
--env-file=/run/secrets/drone-server \
--env=DRONE_AGENTS_ENABLED=true \
--env=DRONE_GITEA_SERVER=https://git.cloonar.com \