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 . .
|
||||
RUN bun run build
|
||||
|
||||
FROM oven/bun:slim
|
||||
FROM golang:alpine AS server_builder
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/build ./build
|
||||
COPY server.ts ./server.ts
|
||||
EXPOSE 3000
|
||||
CMD ["bun", "server.ts"]
|
||||
COPY go.mod ./
|
||||
RUN go mod download
|
||||
COPY main.go ./
|
||||
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