try go server
Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Has been cancelled
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -5,9 +5,18 @@ RUN bun install
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
||||||
FROM oven/bun:slim
|
FROM golang:alpine AS server_builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/build ./build
|
COPY go.mod ./
|
||||||
COPY server.ts ./server.ts
|
RUN go mod download
|
||||||
EXPOSE 3000
|
COPY main.go ./
|
||||||
CMD ["bun", "server.ts"]
|
COPY --from=frontend_builder /app/build ./build
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
WORKDIR /app
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
|
COPY --from=server_builder /app/main ./main
|
||||||
|
COPY --from=server_builder /app/build ./build
|
||||||
|
EXPOSE 8181
|
||||||
|
CMD ["./main"]
|
||||||
|
|||||||
Reference in New Issue
Block a user