Browse Source

chore(deps): npm -> pnpm

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
929f01a807
  1. 4
      packages/nocodb/Dockerfile
  2. 6
      packages/nocodb/Dockerfile.local

4
packages/nocodb/Dockerfile

@ -26,7 +26,7 @@ RUN apk add --no-cache python3 make g++
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm ci on every code change.
# Copying this separately prevents re-running pnpm install on every code change.
COPY ./package*.json ./
COPY ./docker/main.js ./docker/main.js
#COPY ./docker/start.sh /usr/src/appEntry/start.sh
@ -36,7 +36,7 @@ COPY src/public/ ./docker/public/
# install production dependencies,
# reduce node_module size with modclean & removing sqlite deps,
# package built code into app.tar.gz & add execute permission to start.sh
RUN npm ci --omit=dev --quiet \
RUN pnpm install --omit=dev --quiet \
&& npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,@azure/msal-node/dist/**" --run \
&& rm -rf ./node_modules/sqlite3/deps \
&& tar -czf ../appEntry/app.tar.gz ./* \

6
packages/nocodb/Dockerfile.local

@ -9,7 +9,7 @@ RUN apk add --no-cache python3 make g++
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm ci on every code change.
# Copying this separately prevents re-running pnpm install on every code change.
COPY ./package*.json ./
COPY ./docker/nc-gui/ ./docker/nc-gui/
COPY ./docker/main.js ./docker/index.js
@ -19,8 +19,8 @@ COPY src/public/ ./docker/public/
# install production dependencies,
# reduce node_module size with modclean & removing sqlite deps,
# package built code into app.tar.gz & add execute permission to start.sh
RUN npm uninstall --save nocodb-sdk
RUN npm ci --omit=dev --quiet \
RUN pnpm uninstall --save nocodb-sdk
RUN pnpm install --omit=dev --quiet \
&& npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,@azure/msal-node/dist/**" --run \
&& rm -rf ./node_modules/sqlite3/deps \
&& tar -czf ../appEntry/app.tar.gz ./* \

Loading…
Cancel
Save