sanch1tx commited on
Commit
3b6e970
·
verified ·
1 Parent(s): 4336e4d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -0
Dockerfile CHANGED
@@ -1,12 +1,20 @@
1
  FROM node:18
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY package*.json ./
6
  RUN npm install
7
 
 
8
  COPY . .
9
 
 
 
 
 
10
  EXPOSE 7860
11
 
 
12
  CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM node:18
2
 
3
+ # Set working directory
4
  WORKDIR /app
5
 
6
+ # Copy package files and install dependencies
7
  COPY package*.json ./
8
  RUN npm install
9
 
10
+ # Copy rest of the app source code
11
  COPY . .
12
 
13
+ # Set Vite cache directory to a writable path
14
+ ENV VITE_CACHE_DIR=/tmp/vite
15
+
16
+ # Expose port 7860 (as you are running vite dev server on 7860)
17
  EXPOSE 7860
18
 
19
+ # Run the dev server
20
  CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "7860"]