mfoud444 commited on
Commit
9b2630f
·
verified ·
1 Parent(s): 9498968

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -2
Dockerfile CHANGED
@@ -1,17 +1,28 @@
1
  FROM node:20
2
 
 
3
  RUN apt-get update && apt-get install -y git bash
4
 
 
5
  WORKDIR /app
6
 
7
- RUN git clone https://github.com/mfoud444/bolt.diy.rand.git .
 
8
 
 
9
  RUN chown -R node:node /app
10
 
 
11
  USER node
12
 
 
13
  RUN npx --yes pnpm install
14
 
 
 
 
 
15
  EXPOSE 7860
16
 
17
- CMD ["npx", "--yes", "pnpm", "run", "dev", "--host", "0.0.0.0", "-p", "7860"]
 
 
1
  FROM node:20
2
 
3
+ # Install required packages
4
  RUN apt-get update && apt-get install -y git bash
5
 
6
+ # Set working directory
7
  WORKDIR /app
8
 
9
+ # Clone the repository
10
+ RUN git clone https://github.com/mfoud444/bolt.diy.rand.git .
11
 
12
+ # Set correct permissions
13
  RUN chown -R node:node /app
14
 
15
+ # Switch to non-root user
16
  USER node
17
 
18
+ # Install dependencies
19
  RUN npx --yes pnpm install
20
 
21
+ # Build the app
22
+ RUN npx --yes pnpm build
23
+
24
+ # Expose port
25
  EXPOSE 7860
26
 
27
+ # Start the app (adjust depending on your app's entry point)
28
+ CMD ["npx", "--yes", "pnpm", "start"]