refactor(front): improve docker layer caching

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2350>
environments/review-docs-docs-ox2r7i/deployments/17693
jo 2023-06-08 15:01:29 +02:00
rodzic a63c9db168
commit 48f0582b9e
1 zmienionych plików z 10 dodań i 9 usunięć

Wyświetl plik

@ -1,16 +1,17 @@
FROM --platform=linux/amd64 node:18-alpine as builder
WORKDIR /app
COPY package.json yarn.lock /app/
COPY src /app/src/
COPY scripts /app/scripts
COPY public /app/public
COPY vite.config.ts index.html pwa-manifest.json /app/
RUN apk add --no-cache jq bash coreutils python3 build-base
RUN yarn install
RUN yarn build:deployment
WORKDIR /app
COPY package.json yarn.lock /app/
COPY scripts /app/scripts
RUN yarn install
COPY public /app/public
COPY src /app/src
COPY index.html pwa-manifest.json vite.config.ts /app/
RUN yarn build:deployment
FROM nginx:1.23.4-alpine as production