write-ups-challenges-2020-2021/gotta_catch_em_all/nix/backend.nix
2022-11-24 18:03:20 +01:00

16 lines
373 B
Nix

{ pkgs ? import <nixpkgs> {} }:
let app = (pkgs.callPackage ../backend/default.nix {}).package ;
in
pkgs.dockerTools.buildImage {
name = "gotta-catch-them-all-backend";
tag = "latest";
contents = [ pkgs.nodejs app ];
config = {
ExposedPorts = {
"5000/tcp" = {};
};
Cmd = [ "${pkgs.nodejs}/bin/node" "${app}/bin/gotta-catch-them-all" ];
};
}