summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2025-08-16 23:15:44 +0700
committerGravatar GitHub <noreply@github.com> 2025-08-16 23:15:44 +0700
commit8422d7b01b290dece0c8aaf0f5b68cc69fca774d (patch)
tree93c723e50dadfe04a32bfc38ba9d4b916939dc04 /Dockerfile
parentb1a1651ad7e7faf7a87aca8fea1cdad156f3606e (diff)
parent2da6a5f4a666da470d8c2170bb9246f0f5804da5 (diff)
downloadweb-0.5.10.tar.gz
web-0.5.10.zip
v0.5.10: environment splitv0.5.10
feat: split deploy into 2 environments fix: rm server exec in repo
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 45d3e8e..cd3e0eb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,20 +2,21 @@ FROM golang:1.24.5-alpine3.22 AS build-stage
WORKDIR /builddir
COPY . .
-RUN go build -o sayana-demo .
+RUN go build -o sayana-web .
FROM alpine:3.22.1 AS runtime-stage
+ENV ENVIRONMENT=""
ENV B2_KEY_ID=""
ENV B2_APPLICATION_KEY=""
WORKDIR /app
-COPY --from=build-stage /builddir/sayana-demo /app/sayana-demo
+COPY --from=build-stage /builddir/sayana-web /app/sayana-web
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.yaml
+COPY --from=build-stage /builddir/config/config*.yaml /app/config/
RUN apk add --no-cache tzdata
-ENTRYPOINT [ "/app/sayana-demo", "-c", "/app/config.yaml" ]
+ENTRYPOINT /app/sayana-web -c /app/config/config.${ENVIRONMENT}.yaml