Files
smart-search-back/Dockerfile
Nikita Nogovicyn 261f0c0b92
All checks were successful
Deploy Smart Search Backend Test / deploy (push) Successful in 1m32s
удалена хуета ненужная
2026-01-17 21:15:05 +00:00

29 lines
517 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
RUN mkdir -p ./config
EXPOSE 9091
ENTRYPOINT ["./server"]