diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-06-08 10:49:18 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-06-08 10:49:28 -0400 |
| commit | 2f9125d0cbe232dbb0dcd64eab33af356d5d615c (patch) | |
| tree | c9cbe2476e939d41db0319e23e2205f7b7a02960 /cmd/within.website/yeetfile.js | |
| parent | 92a2b4a91b9d57f5c54673f1228278ee21f5e4b1 (diff) | |
| download | x-2f9125d0cbe232dbb0dcd64eab33af356d5d615c.tar.xz x-2f9125d0cbe232dbb0dcd64eab33af356d5d615c.zip | |
cmd/within.website: fix use of http servemux, deploy to k8s
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/within.website/yeetfile.js')
| -rw-r--r-- | cmd/within.website/yeetfile.js | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/cmd/within.website/yeetfile.js b/cmd/within.website/yeetfile.js index b79868c..85abcf1 100644 --- a/cmd/within.website/yeetfile.js +++ b/cmd/within.website/yeetfile.js @@ -1,33 +1,6 @@ -yeet.setenv("GOOS", "linux"); -yeet.setenv("GOARCH", "amd64"); -yeet.setenv("CGO_ENABLED", "0"); +nix.build(".#docker.within-website"); +docker.load("./result"); +docker.push(`ghcr.io/xe/x/within-website`); +yeet.run("kubectl", "apply", "-f=manifest.yaml"); +yeet.run("sh", "-c", "kubectl rollout restart deployments/within-website"); -go.build(); -const fname = slug.build("within.website", { - "config.ts": "config.ts" -}); - -const url = slug.push(fname); -const hash = nix.hashURL(url); - -const expr = nix.expr`{ stdenv }: - -stdenv.mkDerivation { - name = "within.website"; - src = builtins.fetchurl { - url = ${url}; - sha256 = ${hash}; - }; - - phases = "installPhase"; - - installPhase = '' - tar xf $src - mkdir -p $out/bin - cp bin/main $out/bin/withinwebsite - cp config.ts $out/config.ts - ''; -} -`; - -file.write("/home/cadey/code/nixos-configs/pkgs/x/withinwebsite.nix", expr); |
