chore: enhance Dockerfiles and package.json for improved build process
Docker images / backend-image (push) Successful in 3m5s
Docker images / frontend-image (push) Successful in 2m13s
Docker images / notify-webhook (push) Has been skipped

- Added ENV npm_config_ignore_scripts=true to frontend and backend Dockerfiles to skip scripts during npm install, optimizing build times.
- Introduced a postinstall script in package.json to ensure the build process for @mmapp/contracts runs after installation.
This commit is contained in:
Denozordec
2026-05-12 14:04:01 +07:00
parent 01596864dc
commit a5b5a2a3d3
4 changed files with 4 additions and 2 deletions
+1
View File
@@ -2,6 +2,7 @@
FROM node:22-bookworm-slim AS deps
WORKDIR /app
ENV npm_config_ignore_scripts=true
COPY package.json package-lock.json ./
COPY packages/contracts/package.json packages/contracts/
RUN npm ci --workspace=@mmapp/contracts --include-workspace-root --ignore-scripts
+1
View File
@@ -5,6 +5,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 make g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
ENV npm_config_ignore_scripts=true
COPY package.json package-lock.json ./
COPY packages/contracts/package.json packages/contracts/
COPY backend/package.json backend/
+1
View File
@@ -9,6 +9,7 @@
"scripts": {
"dev": "next dev",
"build": "npm run build -w @mmapp/contracts && next build",
"postinstall": "npm run build -w @mmapp/contracts",
"start": "next start",
"lint": "eslint"
},
+1 -2
View File
@@ -7,8 +7,7 @@
"dist"
],
"scripts": {
"build": "tsc -p tsconfig.json",
"prepare": "npm run build"
"build": "tsc -p tsconfig.json"
},
"exports": {
".": {