62 lines
1.3 KiB
Nix
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"];
|
|
};
|
|
};
|
|
};
|
|
}
|