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