Skip to content

Commit

Permalink
Build the Lookout UI in lookoutv2 (#3085)
Browse files Browse the repository at this point in the history
Signed-off-by: Noah Held <[email protected]>
  • Loading branch information
zuqq authored Oct 31, 2023
1 parent b1e51c2 commit f442b47
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ dockers:
- lookoutv2
- lookoutingesterv2
extra_files:
- internal/lookout/ui
- pkg/api/api.swagger.json
- pkg/api/binoculars/api.swagger.json
- config/lookoutv2/config.yaml
- config/lookoutingesterv2/config.yaml
dockerfile: ./build_goreleaser/lookoutv2/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion build/lookoutv2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN addgroup -S -g 2000 armada && adduser -S -u 1000 armada -G armada
USER armada

COPY ./lookoutv2 /app/

COPY ./internal/lookout/ui/build/ /app/internal/lookout/ui/build
COPY ./config/ /app/config/lookoutv2

WORKDIR /app
Expand Down
17 changes: 17 additions & 0 deletions build_goreleaser/lookoutv2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
ARG NODE_BUILD_IMAGE=node:16.14-buster
ARG OPENAPI_BUILD_IMAGE=openapitools/openapi-generator-cli:v5.4.0
ARG BASE_IMAGE=alpine:3.18.3

FROM ${OPENAPI_BUILD_IMAGE} AS OPENAPI

COPY internal/lookout/ui /project/internal/lookout/ui
COPY pkg/api/*.swagger.json /project/pkg/api/
COPY pkg/api/binoculars/*.swagger.json /project/pkg/api/binoculars/
RUN ./project/internal/lookout/ui/openapi.sh

FROM ${NODE_BUILD_IMAGE} AS NODE
COPY --from=OPENAPI /project/internal/lookout/ui /ui/
WORKDIR /ui
RUN yarn install --immutable
RUN yarn run build

FROM ${BASE_IMAGE}
RUN addgroup -S -g 2000 armada && adduser -S -u 1000 armada -G armada
LABEL org.opencontainers.image.title=lookoutv2
LABEL org.opencontainers.image.description="Lookout V2"
LABEL org.opencontainers.image.url=https://hub.docker.com/r/gresearchdev/lookoutv2
USER armada
COPY --from=NODE /ui/build/ /app/internal/lookout/ui/build
COPY lookoutv2 /app/
COPY config/lookoutv2/config.yaml /app/config/lookoutv2/config.yaml
COPY lookoutingesterv2 /app/
Expand Down

0 comments on commit f442b47

Please sign in to comment.