nixos-configs/devices/nos/modules/docker/resume/compose.nix
matt1432 59d2205e7a
All checks were successful
Discord / discord commits (push) Has been skipped
fix(docker): add required changes to make every container work
2024-07-24 20:52:32 -04:00

62 lines
1.3 KiB
Nix

{
config,
pkgs,
...
}: let
inherit (config.sops) secrets;
inherit (config.khepri) rwDataDir;
rwPath = rwDataDir + "/resume";
in {
khepri.compositions."resume" = {
networks.proxy_net = {external = true;};
services = {
"postgres" = {
image = import ./images/postgres.nix pkgs;
restart = "always";
ports = ["5432:5432"];
volumes = [
"${rwPath}/db:/var/lib/postgresql/data"
];
environmentFiles = [secrets.resume.path];
networks = ["proxy_net"];
};
"server" = {
image = import ./images/resume-server.nix pkgs;
restart = "always";
ports = ["3100:3100"];
dependsOn = ["postgres"];
environmentFiles = [secrets.resume.path];
environment = {
PUBLIC_URL = "https://resume.nelim.org";
PUBLIC_SERVER_URL = "https://resauth.nelim.org";
};
networks = ["proxy_net"];
};
"client" = {
image = import ./images/resume-client.nix pkgs;
restart = "always";
ports = ["3060:3000"];
dependsOn = ["server"];
environment = {
PUBLIC_URL = "https://resume.nelim.org";
PUBLIC_SERVER_URL = "https://resauth.nelim.org";
};
networks = ["proxy_net"];
};
};
};
}