perf: optimize docker build contexts and memory footprint

This commit is contained in:
Vishva
2026-08-04 10:57:17 +05:30
parent 87460cfb0f
commit e325d990a7
3 changed files with 7 additions and 7 deletions
+4
View File
@@ -2,8 +2,12 @@ node_modules
dist dist
.git .git
.gitignore .gitignore
.env
.env.local .env.local
.tmp .tmp
*.log *.log
docker-compose*.yml docker-compose*.yml
Dockerfile* Dockerfile*
strapi-cms
server/uploads
server/data
+2 -3
View File
@@ -1,8 +1,7 @@
node_modules node_modules
dist dist
.git .git
.gitignore
.tmp .tmp
.cache build
public/uploads
*.log *.log
Dockerfile
+1 -4
View File
@@ -1,13 +1,10 @@
FROM node:20-alpine FROM node:20-alpine
# Install native build tools for packages like better-sqlite3 / pg
RUN apk add --no-cache python3 make g++ gcc libc-dev
WORKDIR /app WORKDIR /app
# Copy package files and install dependencies # Copy package files and install dependencies
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install --omit=dev --legacy-peer-deps || npm install
# Copy rest of Strapi CMS source code # Copy rest of Strapi CMS source code
COPY . . COPY . .