default.nix (547B)
1 { 2 dockerTools, 3 agate, 4 domain ? "localhost", 5 }: 6 let 7 key = "/certs/${domain}.key"; 8 cert = "/certs/${domain}.crt"; 9 in 10 dockerTools.buildImage { 11 name = "agate"; 12 tag = agate.version; 13 14 contents = [ agate ]; 15 runAsRoot = "mkdir -p /certs /gemini"; 16 17 config = { 18 Cmd = [ 19 "agate" 20 "--content" 21 "/gemini" 22 "--key" 23 key 24 "--cert" 25 cert 26 "--hostname" 27 domain 28 ]; 29 Volumes = { 30 "/certs" = { }; 31 "/gemini" = { }; 32 }; 33 ExposedPorts = { 34 "1965/tcp" = { }; 35 }; 36 }; 37 }