write-ups-challenges-2020-2021/gotta_catch_em_all/nix/backend.nix

16 lines
373 B
Nix
Raw Normal View History

2022-11-24 17:03:20 +00:00
{ 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" ];
};
}