Package depot's gemma as a docker image for Cloud Run
Using <depot>'s gemma project with `dockerTools.buildLayeredImage` because I need access to a nix-packaged server and gemma is the first thing that comes to mind.
This commit is contained in:
parent
bacaa0ca8a
commit
ff06ffcf9c
2 changed files with 34 additions and 4 deletions
|
@ -1,9 +1,18 @@
|
|||
# Attempting to build a Docker image with Nix to run using Google Cloud Run.
|
||||
{ pkgs ? import <nixpkgs> {}, ... }:
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
depot ? import <depot> {},
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.dockerTools.buildLayeredImage {
|
||||
name = "mysql";
|
||||
name = "gemma";
|
||||
tag = "latest";
|
||||
config.Cmd = [ "${pkgs.mysql}/bin/mysqld" ];
|
||||
config.ExposedPorts = {
|
||||
"4242" = {};
|
||||
};
|
||||
config.Env = [
|
||||
"GEMMA_CONFIG=${./config.lisp}"
|
||||
];
|
||||
config.Cmd = [ "${depot.fun.gemma}/bin/gemma" ];
|
||||
maxLayers = 120;
|
||||
}
|
||||
|
|
21
docker/config.lisp
Normal file
21
docker/config.lisp
Normal file
|
@ -0,0 +1,21 @@
|
|||
;; Example configuration file for Gemma
|
||||
|
||||
(config :port 4242
|
||||
:data-dir "/tmp/gemma/")
|
||||
|
||||
(deftask bathroom/wipe-mirror 7)
|
||||
(deftask bathroom/wipe-counter 7)
|
||||
|
||||
;; Bedroom tasks
|
||||
(deftask bedroom/change-sheets 7)
|
||||
(deftask bedroom/vacuum 10)
|
||||
|
||||
;; Kitchen tasks
|
||||
(deftask kitchen/normal-trash 3)
|
||||
(deftask kitchen/green-trash 5)
|
||||
(deftask kitchen/blue-trash 5)
|
||||
(deftask kitchen/wipe-counters 3)
|
||||
(deftask kitchen/vacuum 5 "Kitchen has more crumbs and such!")
|
||||
|
||||
;; Entire place
|
||||
(deftask clean-windows 60)
|
Loading…
Reference in a new issue