summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorLain Iwakura <lain@iwakura.page>2026-03-25 21:56:03 +0300
committerLain Iwakura <lain@iwakura.page>2026-03-25 21:56:03 +0300
commita3397f54c09323b972d733aa4f4e2a4eba6cebc9 (patch)
tree2d115b62f9a3d9cd759db75cee9c191fe68e6089 /Dockerfile
parent319d696398cf5e6df63d29f3129d16cfbe272644 (diff)
feat: staaatus
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..089bd0f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,23 @@
+FROM reg.nx.kroot.sh/makko AS builder-makko
+
+WORKDIR /src
+COPY blog/ blog/
+COPY templates/ templates/
+COPY makko.json .
+
+RUN makko .
+
+FROM golang:alpine AS builder-go
+
+WORKDIR /src
+COPY server/go.mod server/main.go ./
+COPY --from=builder-makko /src/web ./static/
+
+RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /blog-server .
+
+FROM scratch
+
+COPY --from=builder-go /blog-server /blog-server
+
+EXPOSE 8080
+ENTRYPOINT ["/blog-server"]