forked from mtusi2026/mtusi2026lab2
feat: migrate backend to Golang (Gin + GORM)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
FROM golang:1.21-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o main .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates tzdata curl
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /app/main .
|
||||
EXPOSE 8080
|
||||
CMD ["./main"]
|
||||
Reference in New Issue
Block a user