From c1fefa3e249e97e51f155cfb7276730c99b1cf44 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Sat, 16 Aug 2025 22:56:19 +0700 Subject: feat: split deploy into 2 environments fix: rm server exec in repo --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 45d3e8e..30170a8 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" ] -- cgit v1.3.1+13 From 2da6a5f4a666da470d8c2170bb9246f0f5804da5 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Sat, 16 Aug 2025 23:07:23 +0700 Subject: fix: environment subst issue --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 30170a8..cd3e0eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ COPY --from=build-stage /builddir/config/config*.yaml /app/config/ RUN apk add --no-cache tzdata -ENTRYPOINT [ "/app/sayana-web", "-c", "/app/config/config.${ENVIRONMENT}.yaml" ] +ENTRYPOINT /app/sayana-web -c /app/config/config.${ENVIRONMENT}.yaml -- cgit v1.3.1+13