diff --git a/Dockerfile b/Dockerfile index d886468..78b87b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,12 +15,18 @@ COPY . . # Build the application RUN go build -o shortener +# Install goose migration tool +RUN GOBIN=/app go install github.com/pressly/goose/v3/cmd/goose@latest + FROM golang:1.26-bookworm AS runner +WORKDIR /app COPY --from=base /app/shortener /app/shortener +COPY --from=base /app/goose /app/goose +COPY --from=base /app/sql/schema /app/sql/schema # Document the port that may need to be published -EXPOSE 8000 +EXPOSE 8080 # Start the application CMD ["/app/shortener"]