aboutsummaryrefslogtreecommitdiff
path: root/internal/lume/lume.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-11-09 10:50:59 -0500
committerGitHub <noreply@github.com>2024-11-09 10:50:59 -0500
commit20d07c7005665f8e2001b4cbd24e15ec589d9882 (patch)
tree8b98d1446c6d9e42bc2621e633543e0420f43541 /internal/lume/lume.go
parent2b349f56cb20420dd153f40f22b3654b5079100f (diff)
downloadxesite-20d07c7005665f8e2001b4cbd24e15ec589d9882.tar.xz
xesite-20d07c7005665f8e2001b4cbd24e15ec589d9882.zip
Move to Kubernetes (#853)
* start to lift-and-shift to k8s Signed-off-by: Xe Iaso <me@xeiaso.net> * manifest/xesite: properly configure pod disruption budget, hostmount for xesite as a hack Signed-off-by: Xe Iaso <me@xeiaso.net> * properly slonk readiness Signed-off-by: Xe Iaso <me@xeiaso.net> * manifest: move to aeacus Signed-off-by: Xe Iaso <me@xeiaso.net> * internal: add OnionLocation middleware Signed-off-by: Xe Iaso <me@xeiaso.net> * internal/lume: jettison serving from the zipfile Signed-off-by: Xe Iaso <me@xeiaso.net> * yolo deploy to prod Signed-off-by: Xe Iaso <me@xeiaso.net> * okay use a machineproxy here Signed-off-by: Xe Iaso <me@xeiaso.net> * test CI/CD Signed-off-by: Xe Iaso <me@xeiaso.net> * try civo route Signed-off-by: Xe Iaso <me@xeiaso.net> * lol Signed-off-by: Xe Iaso <me@xeiaso.net> * plan c? Signed-off-by: Xe Iaso <me@xeiaso.net> * specify the region Signed-off-by: Xe Iaso <me@xeiaso.net> * lol Signed-off-by: Xe Iaso <me@xeiaso.net> * blog: hello again kubernetes! Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'internal/lume/lume.go')
-rw-r--r--internal/lume/lume.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/internal/lume/lume.go b/internal/lume/lume.go
index 39516d9..24f3451 100644
--- a/internal/lume/lume.go
+++ b/internal/lume/lume.go
@@ -1,7 +1,6 @@
package lume
import (
- "archive/zip"
"bytes"
"context"
"encoding/json"
@@ -359,7 +358,7 @@ func (f *FS) build(ctx context.Context, siteCommit string) error {
zipLoc := filepath.Join(f.opt.DataDir, "site.zip")
- if err := ZipFolder(filepath.Join(cmd.Dir, "_site"), zipLoc); err != nil {
+ if err := ZipFolder(destDir, zipLoc); err != nil {
return fmt.Errorf("lume: can't compress site folder: %w", err)
}
@@ -369,12 +368,7 @@ func (f *FS) build(ctx context.Context, siteCommit string) error {
}
}
- fs, err := zip.OpenReader(zipLoc)
- if err != nil {
- return fmt.Errorf("lume: can't open zip with site content: %w", err)
- }
-
- f.fs = fs
+ f.fs = os.DirFS(destDir)
return nil
}