Update dockerfile to deal with pnpm
This commit is contained in:
+3
-3
@@ -3,14 +3,14 @@
|
||||
FROM node:22-alpine AS dep
|
||||
WORKDIR /app
|
||||
COPY package.json ./package.json
|
||||
COPY yarn.lock ./yarn.lock
|
||||
COPY pnpm-lock.yaml ./pnpm-lock.yaml
|
||||
COPY _scripts ./_scripts
|
||||
# copy `dist` if it exists already
|
||||
COPY dis[t]/web ./dist/web
|
||||
# git is needed for jinter
|
||||
RUN apk add git
|
||||
# don't rebuild if you don't have to
|
||||
RUN if [ ! -d 'dist/web' ]; then yarn ci; fi
|
||||
RUN if [ ! -d 'dist/web' ]; then pnpm i; fi
|
||||
|
||||
## Build Stage ##
|
||||
FROM node:22-alpine AS build
|
||||
@@ -19,7 +19,7 @@ COPY . .
|
||||
COPY --from=dep /app/dis[t]/web ./dist/web
|
||||
COPY --from=dep /app/node_module[s] ./node_modules
|
||||
# don't rebuild if you don't have to
|
||||
RUN if [ ! -d 'dist/web' ]; then yarn pack:web; fi
|
||||
RUN if [ ! -d 'dist/web' ]; then pnpm run pack:web; fi
|
||||
|
||||
## App Stage ##
|
||||
FROM nginx:latest as app
|
||||
|
||||
Reference in New Issue
Block a user