Files
smart-search-back/Dockerfile
vallyenfail e7e9d620b8
All checks were successful
Deploy Smart Search Backend Test / deploy (push) Successful in 1m26s
add service
2026-01-18 00:33:27 +03:00

29 lines
556 B
Docker

FROM golang:1.24-alpine AS builder
RUN apk add --no-cache git make protobuf-dev
WORKDIR /app
COPY go.mod go.sum ./
ENV GOTOOLCHAIN=auto
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -a -installsuffix cgo -o server cmd/server/main.go
FROM alpine:latest
RUN apk --no-cache add ca-certificates postgresql-client bash
WORKDIR /root/
COPY --from=builder /app/server .
COPY --from=builder /app/migrations ./migrations
COPY --from=builder /app/config/boot.yaml ./config/boot.yaml
EXPOSE 9091
ENTRYPOINT ["./server"]