summaryrefslogtreecommitdiffci
path: root/Dockerfile
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2025-08-30 00:36:46 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2025-08-30 00:36:46 +0700
commit78fe4481099fcf6666f1a259e38d9d828a253347 (patch)
treec4f8bc344da8a26536fb85d5fb3fec891bdf7eb6 /Dockerfile
parent753fe7f1d5bf837a85481425bd6bf6b431ffb611 (diff)
downloadweb-78fe4481099fcf6666f1a259e38d9d828a253347.tar.gz
web-78fe4481099fcf6666f1a259e38d9d828a253347.zip
feat: add persistent storage for likes
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index ffe5ac3..4388e5d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,10 @@
-FROM golang:1.24.5-alpine3.22 AS build-stage
+FROM golang:1.24.6-alpine3.22 AS build-stage
+
+RUN apk add --no-cache sqlite-dev
WORKDIR /builddir
COPY . .
-RUN go build -o sayana-web .
+RUN CGO_ENABLED=1 go build -o sayana-web .
FROM alpine:3.22.1 AS runtime-stage
@@ -13,11 +15,12 @@ ENV B2_APPLICATION_KEY=""
WORKDIR /app
COPY --from=build-stage /builddir/sayana-web /app/sayana-web
+COPY --from=build-stage /builddir/migrations /app/migrations
COPY --from=build-stage /builddir/static /app/static
COPY --from=build-stage /builddir/views /app/views
COPY --from=build-stage /builddir/locale/*.yaml /app/locale/
COPY --from=build-stage /builddir/config/config*.yaml /app/config/
-RUN apk add --no-cache tzdata
+RUN apk add --no-cache tzdata sqlite
ENTRYPOINT /app/sayana-web -c /app/config/config.${ENVIRONMENT}.yaml