fix: add root Dockerfile with backend context

This commit is contained in:
GoHorse Deploy 2026-02-05 12:57:02 +00:00
parent 67e38ab0e0
commit 9e3dbe3a33

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM mirror.gcr.io/library/golang:1.23-alpine AS builder
WORKDIR /app
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags=" -s -w\ -o main .
FROM alpine:latest
WORKDIR /app
RUN apk --no-cache add ca-certificates tzdata
COPY --from=builder /app/main .
COPY --from=builder /app/migrations ./migrations
CMD [\.\/main\]