mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-17 21:37:35 +00:00
6bb3220186
* better cache dependencies * ignore local statik.go * remove previously generated statik.go file * remove redundant .dockerignore
41 lines
1.1 KiB
Docker
41 lines
1.1 KiB
Docker
ARG NODE_VERSION=16
|
|
|
|
#######################
|
|
## With this step we prepare all node_modules, this helps caching the build
|
|
## Speed up this step by mounting your local node_modules directory
|
|
## We also copy and generate the source code
|
|
#######################
|
|
FROM node:${NODE_VERSION} as npm-base
|
|
WORKDIR /console
|
|
|
|
# Dependencies
|
|
COPY console/package.json console/package-lock.json ./
|
|
RUN npm ci
|
|
|
|
# Sources
|
|
COPY console .
|
|
COPY --from=zitadel-base:local /proto /proto
|
|
COPY --from=zitadel-base:local /usr/local/bin /usr/local/bin/.
|
|
COPY build/console build/console/
|
|
RUN build/console/generate-grpc.sh
|
|
|
|
#######################
|
|
## copy for local dev
|
|
#######################
|
|
FROM scratch as npm-copy
|
|
COPY --from=npm-base /console/src/app/proto/generated /console/src/app/proto/generated
|
|
|
|
#######################
|
|
## angular lint workspace and prod build
|
|
#######################
|
|
FROM npm-base as angular-build
|
|
|
|
RUN npm run lint
|
|
RUN npm run prodbuild
|
|
|
|
#######################
|
|
## Only Copy Assets
|
|
#######################
|
|
FROM scratch as angular-export
|
|
COPY --from=angular-build /console/dist/console .
|