remove mongodb from nfss

This commit is contained in:
Yan Lin 2026-02-10 14:34:17 +01:00
parent 8b23b480bf
commit ee24f2848b
5 changed files with 2 additions and 32 deletions

View file

@ -10,15 +10,5 @@ in
# Container definitions for nfss host # Container definitions for nfss host
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
mongodb = {
image = "docker.io/mongo:7";
volumes = [ "/var/lib/mongodb:/data/db" ];
environment = { TZ = systemTZ; };
environmentFiles = [ "/etc/mongodb-env" ];
ports = [ "27017:27017" ];
extraOptions = [ "--network=podman" ];
autoStart = true;
};
}; };
} }

View file

@ -136,10 +136,9 @@
# Borg backup configuration # Borg backup configuration
services.borg-client-custom = { services.borg-client-custom = {
enable = true; enable = false;
repositoryUrl = "ssh://borg-box/./nfss"; repositoryUrl = "ssh://borg-box/./nfss";
backupPaths = [ backupPaths = [
"/var/lib/mongodb"
]; ];
backupFrequency = "*-*-* 01:00:00"; backupFrequency = "*-*-* 01:00:00";
retention = { retention = {

View file

@ -44,20 +44,5 @@
}; };
tcp = {
routers.mongodb = {
rule = "HostSNI(`mongodb.yanlincs.com`)";
service = "mongodb";
entrypoints = [ "mongodb" ];
tls = {
certResolver = "cloudflare";
domains = [{ main = "*.yanlincs.com"; }];
};
};
services.mongodb = {
loadBalancer.servers = [{ address = "nfss.yanlincs.com:27017"; }];
};
};
}; };
} }

View file

@ -41,8 +41,7 @@
useDHCP = true; # VPS typically use DHCP useDHCP = true; # VPS typically use DHCP
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 80 443 22000 27017 ]; allowedTCPPorts = [ 22 80 443 ];
allowedUDPPorts = [ 22000 ];
trustedInterfaces = [ "tailscale0" ]; trustedInterfaces = [ "tailscale0" ];
}; };
}; };

View file

@ -32,9 +32,6 @@
address = ":443"; address = ":443";
transport.respondingTimeouts.readTimeout = "0s"; transport.respondingTimeouts.readTimeout = "0s";
}; };
mongodb = {
address = ":27017";
};
}; };
# Certificate resolver using Cloudflare DNS challenge # Certificate resolver using Cloudflare DNS challenge