mirror of
https://github.com/offen/website.git
synced 2024-11-22 17:10:29 +01:00
leverage layer caching for node deps
This commit is contained in:
parent
becb0bcef9
commit
5656a3df7d
@ -1,34 +1,43 @@
|
|||||||
FROM node:10 as auditorium
|
FROM node:10 as auditorium
|
||||||
|
|
||||||
COPY ./auditorium /code/auditorium
|
COPY ./auditorium/package.json /code/deps/package.json
|
||||||
COPY ./packages /code/packages
|
COPY ./packages /code/packages
|
||||||
|
WORKDIR /code/deps
|
||||||
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||||
|
RUN npm install
|
||||||
|
COPY ./auditorium /code/auditorium
|
||||||
COPY ./styles /code/styles
|
COPY ./styles /code/styles
|
||||||
COPY ./banner.txt /code/banner.txt
|
COPY ./banner.txt /code/banner.txt
|
||||||
WORKDIR /code/auditorium
|
WORKDIR /code/auditorium
|
||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
RUN cp -a /code/deps/node_modules /code/auditorium/
|
||||||
RUN npm install
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:10 as script
|
FROM node:10 as script
|
||||||
|
|
||||||
COPY ./script /code/script
|
COPY ./script/package.json /code/deps/package.json
|
||||||
COPY ./packages /code/packages
|
COPY ./packages /code/packages
|
||||||
COPY ./banner.txt /code/banner.txt
|
WORKDIR /code/deps
|
||||||
WORKDIR /code/script
|
|
||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
COPY ./script /code/script
|
||||||
|
COPY ./banner.txt /code/banner.txt
|
||||||
|
WORKDIR /code/script
|
||||||
|
RUN cp -a /code/deps/node_modules /code/script/
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:10 as vault
|
FROM node:10 as vault
|
||||||
|
|
||||||
COPY ./vault /code/vault
|
COPY ./vault/package.json /code/deps/package.json
|
||||||
COPY ./packages /code/packages
|
COPY ./packages /code/packages
|
||||||
COPY ./banner.txt /code/banner.txt
|
WORKDIR /code/deps
|
||||||
WORKDIR /code/vault
|
|
||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
COPY ./vault /code/vault
|
||||||
|
COPY ./banner.txt /code/banner.txt
|
||||||
|
WORKDIR /code/vault
|
||||||
|
RUN cp -a /code/deps/node_modules /code/vault/
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user