Bluestrikeai commited on
Commit
73eb3a7
·
verified ·
1 Parent(s): 9284e01

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -19
Dockerfile CHANGED
@@ -1,26 +1,21 @@
1
- FROM python:3.10-slim
2
-
3
- # Install system dependencies, Node.js, and npm
4
- RUN apt-get update && apt-get install -y curl \
5
- && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
6
- && apt-get install -y nodejs \
7
- && apt-get clean
8
-
9
- # Set up working directory
10
  WORKDIR /app
11
 
12
- # Install Python requirements
13
- COPY requirements.txt .
14
- RUN pip install --no-cache-dir -r requirements.txt
 
 
15
 
16
- # Copy application files
17
  COPY . .
 
18
 
19
- # Create workspace for the AI to build the app
20
- RUN mkdir -p /app/workspace
 
 
21
 
22
- # Expose ports for Gradio UI (7860) and Live Preview (3000)
23
- EXPOSE 7860
24
- EXPOSE 3000
25
 
26
- CMD ["python", "app.py"]
 
 
1
+ FROM node:20-bookworm-slim AS build
 
 
 
 
 
 
 
 
2
  WORKDIR /app
3
 
4
+ COPY package.json ./
5
+ COPY apps/server/package.json apps/server/package.json
6
+ COPY apps/web/package.json apps/web/package.json
7
+
8
+ RUN npm install
9
 
 
10
  COPY . .
11
+ RUN npm run build
12
 
13
+ FROM node:20-bookworm-slim
14
+ WORKDIR /app
15
+ ENV NODE_ENV=production
16
+ ENV PORT=7860
17
 
18
+ COPY --from=build /app /app
 
 
19
 
20
+ EXPOSE 7860
21
+ CMD ["npm", "run", "start", "-w", "apps/server"]