2022-09-11 14:35:49 +00:00
|
|
|
# This dockerfile only builds the javascript part of the project, so tsc and angular compilation
|
|
|
|
|
2022-10-11 17:47:02 +00:00
|
|
|
FROM node:latest AS BUILDER_STAGE1
|
2022-09-11 14:35:49 +00:00
|
|
|
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
|
|
|
|
ADD . /picsur
|
|
|
|
WORKDIR /picsur
|
|
|
|
|
|
|
|
RUN yarn workspaces focus -A
|
|
|
|
|
|
|
|
RUN yarn workspace picsur-shared build
|
|
|
|
RUN yarn workspace picsur-frontend build
|
|
|
|
RUN yarn workspace picsur-backend build
|
|
|
|
|
|
|
|
RUN mkdir -p /trimmed
|
|
|
|
|
|
|
|
RUN cp -r --parents ./{package.json,yarn.lock,.yarnrc.yml,branding} /trimmed
|
|
|
|
RUN cp -r --parents ./{frontend,backend,shared}/{dist,package.json} /trimmed
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
|
|
|
WORKDIR /picsur
|
|
|
|
ADD .yarn .yarn
|
|
|
|
COPY --from=BUILDER_STAGE1 /trimmed ./
|