forked from mikesir87/visual-chatbot
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
32 lines (26 loc) · 847 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM node:22-slim AS build-react-app
WORKDIR /app
COPY client/package*.json ./
RUN npm install
COPY client/ ./
RUN npm run build
FROM node:22-slim AS sample-server
WORKDIR /usr/local/app
ENV NODE_ENV=production
COPY sample-mcp-server/package*.json ./
RUN npm install
COPY sample-mcp-server/src ./src
# Stage 2: Set up the backend server
FROM node:22-slim AS backend
WORKDIR /usr/local/app
ENV NODE_ENV=production
COPY api/package*.json ./
RUN npm install && npm cache clean --force
COPY api/ ./
# Copy the built React app to the public directory of the backend
COPY --from=build-react-app /app/dist /usr/local/app/public
COPY --from=sample-server /usr/local/app /usr/local/sample-mcp-server
COPY --from=docker --link /usr/local/bin/docker /usr/local/bin/docker
# Expose the port and start the server
EXPOSE 3000
CMD ["node", "src/index.mjs"]