newsbot-api/Dockerfile

23 lines
552 B
Docker
Raw Permalink Normal View History

2024-04-28 11:42:10 -07:00
FROM golang:1.22 as build
COPY . /app
WORKDIR /app
# Always make sure that swagger docs are updated
RUN go install github.com/swaggo/swag/cmd/swag@latest
RUN /go/bin/swag init -g cmd/server.go
#RUN go build .
#RUN go install github.com/pressly/goose/v3/cmd/goose@latest
FROM alpine:latest as app
RUN apk --no-cache add bash
RUN apk --no-cache add libc6-compat
RUN apk --no-cache add chromium
RUN mkdir /app && mkdir /app/migrations
COPY --from=build /app/server /app
COPY ./internal/database/migrations/ /app/migrations
CMD [ "/app/collector" ]