fix(frontend): ensure react-scripts is available in Docker container

Use npm ci + npm rebuild for deterministic installs. Add verification
step that catches missing react-scripts early.

Fixes #411
This commit is contained in:
guoyangzhen
2026-03-14 16:41:21 +08:00
parent 781275c881
commit 7066f62942
+7 -4
View File
@@ -2,15 +2,18 @@ FROM node:18
WORKDIR /app WORKDIR /app
# Install dependencies # Copy package files
COPY agentic-seek-front/package.json agentic-seek-front/package-lock.json ./ COPY agentic-seek-front/package.json agentic-seek-front/package-lock.json ./
RUN npm install
# Install dependencies with explicit bin linking
RUN npm ci && npm rebuild
# Copy application code # Copy application code
COPY agentic-seek-front/ . COPY agentic-seek-front/ .
# Expose port # Verify react-scripts is available (catches install issues early)
RUN test -f node_modules/.bin/react-scripts || npm install react-scripts
EXPOSE 3000 EXPOSE 3000
# Run the application
CMD ["npm", "start"] CMD ["npm", "start"]