Spaces:
Sleeping
Sleeping
File size: 411 Bytes
de8f299 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # ===== BUILD STAGE =====
FROM golang:1.22-alpine AS builder
WORKDIR /app
# Buat go.mod & go.sum otomatis dengan nama module gemini_textai
RUN go mod init gemini_textai
COPY main.go ./
RUN go mod tidy
# Build binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app
# ===== RUNTIME STAGE =====
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/app .
ENV PORT=7860
EXPOSE 7860
CMD ["./app"] |