2023-02-28 16:29:09 -03:00
|
|
|
FROM quay.io/goswagger/swagger:latest as build-docs
|
2021-11-23 07:26:33 -03:00
|
|
|
WORKDIR /app
|
2019-05-17 15:24:35 -04:00
|
|
|
COPY . .
|
2021-11-23 08:13:46 -03:00
|
|
|
RUN make docs
|
|
|
|
|
2023-02-28 16:29:09 -03:00
|
|
|
FROM node:18-alpine as build-web
|
|
|
|
WORKDIR /web
|
|
|
|
COPY web .
|
|
|
|
COPY --from=build-docs /app/web/public/swagger.json /web/public
|
2023-03-07 12:55:13 -03:00
|
|
|
RUN yarn install --ignore-optional
|
2021-11-23 07:26:33 -03:00
|
|
|
RUN yarn build
|
|
|
|
|
2023-02-28 16:29:09 -03:00
|
|
|
FROM golang:alpine as build-app
|
2021-11-23 07:26:33 -03:00
|
|
|
WORKDIR /app
|
2023-02-28 16:29:09 -03:00
|
|
|
COPY . .
|
|
|
|
COPY --from=build-web /web/dist /app/web/dist
|
|
|
|
RUN go build -o app .
|
2019-05-17 15:24:35 -04:00
|
|
|
|
2023-02-28 16:29:09 -03:00
|
|
|
FROM alpine:latest
|
2019-05-17 15:24:35 -04:00
|
|
|
RUN apk --no-cache add ca-certificates
|
2023-02-28 16:29:09 -03:00
|
|
|
COPY --from=build-app /app/app .
|
2021-11-23 08:40:31 -03:00
|
|
|
USER 1000:1000
|
2019-05-17 15:54:38 -04:00
|
|
|
CMD ["./app", "--config=/etc/justlog.json"]
|
2019-05-17 15:24:35 -04:00
|
|
|
EXPOSE 8025
|