about summary refs log tree commit diff
path: root/users/wpcarro/playbooks/nix_gcr/cloud_run.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/playbooks/nix_gcr/cloud_run.nix')
-rw-r--r--users/wpcarro/playbooks/nix_gcr/cloud_run.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/users/wpcarro/playbooks/nix_gcr/cloud_run.nix b/users/wpcarro/playbooks/nix_gcr/cloud_run.nix
new file mode 100644
index 0000000000..1f473b5f59
--- /dev/null
+++ b/users/wpcarro/playbooks/nix_gcr/cloud_run.nix
@@ -0,0 +1,14 @@
+{ pkgs, 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;
+}