From b5e17a658acc2a12859b4dc9235cf45168248e10 Mon Sep 17 00:00:00 2001 From: Erik Grobecker Date: Fri, 18 Oct 2024 08:50:32 +0200 Subject: [PATCH] changed dockerfile to arm64 --- Dockerfile | 10 ++++++++++ content/blog/test.md | 5 ++--- justfile | 5 ++++- nixpacks.toml | 3 ++- 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dbe8369 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM --platform=arm64 alpine:3.20.3 AS zola + +RUN apk add zola +COPY . /project +WORKDIR /project +RUN ["zola", "build"] + +FROM --platform=arm64 ghcr.io/static-web-server/static-web-server:2 +WORKDIR / +COPY --from=zola /project/public /public \ No newline at end of file diff --git a/content/blog/test.md b/content/blog/test.md index 7fd9053..e611657 100644 --- a/content/blog/test.md +++ b/content/blog/test.md @@ -1,9 +1,8 @@ +++ title = "test" draft = false -insert_anchor_links = "left" -tags = [ "typst" ] -render = true +# insert_anchor_links = "left" +# tags = [ "typst" ] # [extra] # poor = true diff --git a/justfile b/justfile index 9b96541..c6454d8 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,5 @@ # use PowerShell instead of sh: -#set shell := ["powershell.exe", "-c"] +set shell := ["powershell.exe", "-c"] # view the blog as it would be published in a browser @@ -9,3 +9,6 @@ view: # view the blog with drafts in a browser view-drafts: zola serve --drafts -f + +build-con: + docker build --platform linux/amd64,linux/arm64 -t git.grobecker.me/erik/blog:latest --push . \ No newline at end of file diff --git a/nixpacks.toml b/nixpacks.toml index 0af4735..1437517 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -1,7 +1,8 @@ providers = ["...", "staticfile"] [phases.setup] -nixPkgs = ["zola"] +nixPkgs = ["cargo-binstall", "cargo"] +cmds = ["cargo binstall https://github.com/getzola/zola.git"] [phases.build] cmds = ["zola build"]