Move ALL dependencies to production deps, remove devDependencies entirely
This commit is contained in:
+3
-4
@@ -15,8 +15,8 @@ WORKDIR /app
|
|||||||
# Copy package files for efficient layer caching
|
# Copy package files for efficient layer caching
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
|
|
||||||
# Install production dependencies only (using ci for reproducible builds)
|
# Install all dependencies (production + dev all in dependencies now)
|
||||||
RUN npm ci --only=production --ignore-scripts && npm cache clean --force
|
RUN npm ci --ignore-scripts && npm cache clean --force
|
||||||
|
|
||||||
# ============================================
|
# ============================================
|
||||||
# Stage 2: Builder
|
# Stage 2: Builder
|
||||||
@@ -64,14 +64,13 @@ COPY --from=builder /app/public ./public
|
|||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||||
|
|
||||||
# Copy node_modules from builder (includes all deps needed for migrations)
|
# Copy node_modules from builder (includes ALL dependencies)
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
|
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
|
||||||
|
|
||||||
# Copy drizzle migrations, config, and schema (needed for migrations)
|
# Copy drizzle migrations, config, and schema (needed for migrations)
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle
|
COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/drizzle.config.ts ./
|
COPY --from=builder --chown=nextjs:nodejs /app/drizzle.config.ts ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/package.json ./
|
COPY --from=builder --chown=nextjs:nodejs /app/package.json ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/package-lock.json ./
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/src/db/schema.ts ./src/db/schema.ts
|
COPY --from=builder --chown=nextjs:nodejs /app/src/db/schema.ts ./src/db/schema.ts
|
||||||
|
|
||||||
# Copy entrypoint script
|
# Copy entrypoint script
|
||||||
|
|||||||
+14
-16
@@ -21,12 +21,23 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.972.0",
|
"@aws-sdk/client-s3": "^3.972.0",
|
||||||
|
"@tailwindcss/postcss": "^4",
|
||||||
|
"@types/bcryptjs": "^2.4.6",
|
||||||
|
"@types/node": "^20.19.30",
|
||||||
|
"@types/pg": "^8.16.0",
|
||||||
|
"@types/react": "^19",
|
||||||
|
"@types/react-dom": "^19",
|
||||||
|
"@types/uuid": "^10.0.0",
|
||||||
"@upstash/redis": "^1.34.3",
|
"@upstash/redis": "^1.34.3",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dotenv": "^17.2.3",
|
"dotenv": "^17.2.3",
|
||||||
|
"dotenv-cli": "^11.0.0",
|
||||||
"drizzle-kit": "^0.31.8",
|
"drizzle-kit": "^0.31.8",
|
||||||
"drizzle-orm": "^0.44.1",
|
"drizzle-orm": "^0.44.1",
|
||||||
|
"eslint": "^9",
|
||||||
|
"eslint-config-next": "16.1.4",
|
||||||
|
"fast-check": "^4.5.3",
|
||||||
"jose": "^6.0.11",
|
"jose": "^6.0.11",
|
||||||
"libsodium-wrappers-sumo": "^0.8.2",
|
"libsodium-wrappers-sumo": "^0.8.2",
|
||||||
"lucide-react": "^0.562.0",
|
"lucide-react": "^0.562.0",
|
||||||
@@ -35,24 +46,11 @@
|
|||||||
"pg": "^8.17.2",
|
"pg": "^8.17.2",
|
||||||
"react": "19.2.3",
|
"react": "19.2.3",
|
||||||
"react-dom": "19.2.3",
|
"react-dom": "19.2.3",
|
||||||
"uuid": "^11.1.0",
|
|
||||||
"zod": "^4.3.5"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@tailwindcss/postcss": "^4",
|
|
||||||
"@types/bcryptjs": "^2.4.6",
|
|
||||||
"@types/node": "^20.19.30",
|
|
||||||
"@types/pg": "^8.16.0",
|
|
||||||
"@types/react": "^19",
|
|
||||||
"@types/react-dom": "^19",
|
|
||||||
"@types/uuid": "^10.0.0",
|
|
||||||
"dotenv-cli": "^11.0.0",
|
|
||||||
"eslint": "^9",
|
|
||||||
"eslint-config-next": "16.1.4",
|
|
||||||
"fast-check": "^4.5.3",
|
|
||||||
"tailwindcss": "^4",
|
"tailwindcss": "^4",
|
||||||
"tsx": "^4.21.0",
|
"tsx": "^4.21.0",
|
||||||
"typescript": "^5",
|
"typescript": "^5",
|
||||||
"vitest": "^4.0.18"
|
"uuid": "^11.1.0",
|
||||||
|
"vitest": "^4.0.18",
|
||||||
|
"zod": "^4.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user