Skip to content

Commit

Permalink
working Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
stanistan committed Jun 29, 2024
1 parent 38ad2af commit 140a4e8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

FROM oven/bun:1.1 as tw
WORKDIR /app
COPY package.json bun.lockb ./
Expand All @@ -8,14 +7,14 @@ RUN bun run tailwindcss -i ./static/input.css -o styles.css --minify


FROM golang:1.22.0 as app
ENV GOARCH=amd64
ENV GOOS=linux
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .

ARG VERSION_SHA
COPY . .
ARG VERSION_SHA=unspecified
ENV GOOS=linux
ENV GOARCH=amd64
RUN go build -o server -ldflags="-X main.version=$VERSION_SHA" ./cmd/veun

FROM scratch as prod
Expand All @@ -24,6 +23,4 @@ COPY --from=app /app/server /app
COPY --from=app /app/static /static
COPY --from=tw /app/styles.css /static/styles.css

ENTRYPOINT ["/app"]

CMD [ "serve" ]
ENTRYPOINT ["/app", "serve"]

0 comments on commit 140a4e8

Please sign in to comment.