8562bf5b5a
I create //deploy when I first deployed a few applications that I packaged with Nix. This was before I setup socrates as my "cloud". Now I deploy all of my services using NixOS. The name "deploy" is a bit stale. I'm renaming it //nix_gcr because it documents how I can deploy Nix-packaged projects on Google Cloud Run.
18 lines
322 B
Nix
18 lines
322 B
Nix
{
|
|
pkgs ? import <nixpkgs> {},
|
|
depot ? import <depot> {},
|
|
...
|
|
}:
|
|
|
|
pkgs.dockerTools.buildLayeredImage {
|
|
name = "gemma";
|
|
tag = "latest";
|
|
config.ExposedPorts = {
|
|
"4242" = {};
|
|
};
|
|
config.Env = [
|
|
"GEMMA_CONFIG=${./config.lisp}"
|
|
];
|
|
config.Cmd = [ "${depot.fun.gemma}/bin/gemma" ];
|
|
maxLayers = 120;
|
|
}
|