nixos-configs/configurations/nos/modules/docker/resume/compose.nix
matt1432 6ca0d7248b
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: rename some flake attr directories
2024-12-16 15:51:41 -05: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"];
};
};
};
}