Files
smart-search-back/Dockerfile
vallyenfail 16c4dbc18b
All checks were successful
Deploy Smart Search Backend / deploy (push) Successful in 1m27s
Merge branch 'test'
# Conflicts:
#	Dockerfile
2026-01-18 00:49:16 +03:00

28 lines
555 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"]