2024-04-28 11:42:10 -07:00
|
|
|
FROM golang:1.22 as build
|
2022-04-02 12:05:32 -07:00
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
2023-01-31 17:47:04 -08:00
|
|
|
|
|
|
|
# Always make sure that swagger docs are updated
|
|
|
|
RUN go install github.com/swaggo/swag/cmd/swag@latest
|
2024-05-05 10:02:17 -07:00
|
|
|
RUN /go/bin/swag init -g cmd/server.go
|
2023-01-31 17:47:04 -08:00
|
|
|
|
2024-05-05 10:02:17 -07:00
|
|
|
#RUN go build .
|
|
|
|
#RUN go install github.com/pressly/goose/v3/cmd/goose@latest
|
2022-04-02 12:05:32 -07:00
|
|
|
|
2022-07-13 15:52:25 -07:00
|
|
|
FROM alpine:latest as app
|
2022-04-02 12:05:32 -07:00
|
|
|
|
2022-07-14 14:27:40 -07:00
|
|
|
RUN apk --no-cache add bash
|
|
|
|
RUN apk --no-cache add libc6-compat
|
|
|
|
RUN apk --no-cache add chromium
|
|
|
|
|
2022-07-13 15:52:25 -07:00
|
|
|
RUN mkdir /app && mkdir /app/migrations
|
2024-05-05 10:02:17 -07:00
|
|
|
COPY --from=build /app/server /app
|
|
|
|
COPY ./internal/database/migrations/ /app/migrations
|
2022-06-08 21:17:08 -07:00
|
|
|
|
2022-07-13 15:52:25 -07:00
|
|
|
CMD [ "/app/collector" ]
|