improvement: DockerFiles updated to avoid some deployment issues.
This commit is contained in:
@@ -4,7 +4,14 @@ FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
# Same safeguard as backend: incomplete npm ci can leave node_modules/.bin empty.
|
||||
RUN npm ci --no-audit --no-fund || true; \
|
||||
if [ ! -e node_modules/.bin/next ]; then \
|
||||
echo "Incomplete npm ci (missing .bin links) — falling back to npm install"; \
|
||||
rm -rf node_modules; \
|
||||
npm install --no-audit --no-fund; \
|
||||
fi; \
|
||||
test -e node_modules/.bin/next
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user