Merge pull request #447 from guoyangzhen/fix/frontend-react-scripts-not-found
fix(frontend): ensure react-scripts is available in Docker container
This commit is contained in:
@@ -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"]
|
||||||
Reference in New Issue
Block a user