2025-01-30 23:25:25 -05:00
|
|
|
rwDataDir: {
|
2024-07-24 15:49:31 -04:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-02-28 13:17:20 -05:00
|
|
|
inherit (config.sops) secrets;
|
|
|
|
|
|
|
|
rwPath = rwDataDir + "/resume";
|
|
|
|
in {
|
2025-01-30 23:25:25 -05:00
|
|
|
virtualisation.docker.compose."resume" = {
|
2024-07-24 20:52:32 -04:00
|
|
|
networks.proxy_net = {external = true;};
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
services = {
|
|
|
|
"postgres" = {
|
2025-01-30 23:25:25 -05:00
|
|
|
image = pkgs.callPackage ./images/postgres.nix pkgs;
|
2024-07-24 20:52:32 -04:00
|
|
|
restart = "always";
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
ports = ["5432:5432"];
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
volumes = [
|
|
|
|
"${rwPath}/db:/var/lib/postgresql/data"
|
|
|
|
];
|
|
|
|
|
2025-01-30 23:25:25 -05:00
|
|
|
env_file = [secrets.resume.path];
|
2024-07-24 20:52:32 -04:00
|
|
|
networks = ["proxy_net"];
|
|
|
|
};
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
"server" = {
|
2025-01-30 23:25:25 -05:00
|
|
|
image = pkgs.callPackage ./images/resume-server.nix pkgs;
|
2024-07-24 20:52:32 -04:00
|
|
|
restart = "always";
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
ports = ["3100:3100"];
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2025-01-30 23:25:25 -05:00
|
|
|
depends_on = ["postgres"];
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2025-01-30 23:25:25 -05:00
|
|
|
env_file = [secrets.resume.path];
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environment = {
|
|
|
|
PUBLIC_URL = "https://resume.nelim.org";
|
|
|
|
PUBLIC_SERVER_URL = "https://resauth.nelim.org";
|
|
|
|
};
|
|
|
|
networks = ["proxy_net"];
|
2024-02-28 13:17:20 -05:00
|
|
|
};
|
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
"client" = {
|
2025-01-30 23:25:25 -05:00
|
|
|
image = pkgs.callPackage ./images/resume-client.nix pkgs;
|
2024-07-24 20:52:32 -04:00
|
|
|
restart = "always";
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
ports = ["3060:3000"];
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2025-01-30 23:25:25 -05:00
|
|
|
depends_on = ["server"];
|
2024-02-28 13:17:20 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environment = {
|
|
|
|
PUBLIC_URL = "https://resume.nelim.org";
|
|
|
|
PUBLIC_SERVER_URL = "https://resauth.nelim.org";
|
|
|
|
};
|
|
|
|
networks = ["proxy_net"];
|
2024-02-28 13:17:20 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2025-01-30 23:25:25 -05:00
|
|
|
|
|
|
|
# For accurate stack trace
|
|
|
|
_file = ./compose.nix;
|
2024-02-28 13:17:20 -05:00
|
|
|
}
|