mirror of
https://github.com/Dvorinka/SpotifyRecAlg.git
synced 2026-06-03 20:13:03 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM golang:1.24-bookworm AS build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum* ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go install github.com/pressly/goose/v3/cmd/goose@v3.24.3
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/recommendation-api ./cmd/api
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/recommendation-api /app/recommendation-api
|
||||
COPY --from=build /go/bin/goose /app/goose
|
||||
COPY migrations /app/migrations
|
||||
COPY docs /app/docs
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/app/recommendation-api"]
|
||||
Reference in New Issue
Block a user