add mongodb to vps
This commit is contained in:
parent
31de6897de
commit
d2ab99fd7f
2 changed files with 11 additions and 1 deletions
|
|
@ -22,5 +22,15 @@ in
|
|||
autoStart = true;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
useDHCP = true; # VPS typically use DHCP
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
allowedTCPPorts = [ 22 80 443 27017 ];
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue