Undertalefan commited on
Commit
eb68624
·
verified ·
1 Parent(s): 48e68b0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -1,6 +1,9 @@
1
  FROM node:18
2
 
3
- # Clone the GitHub repo directly
 
 
 
4
  RUN git clone https://github.com/lezzthanthree/SEKAI-Stories.git /app
5
 
6
  WORKDIR /app
@@ -8,11 +11,14 @@ WORKDIR /app
8
  # Install dependencies
9
  RUN npm install
10
 
11
- # Hugging Face Spaces requires your app to listen on port 7860
12
- ENV PORT=7860
 
 
 
13
 
14
- # Make sure the app uses the PORT variable (if applicable)
15
  EXPOSE 7860
16
 
17
- # Start the app
18
- CMD ["npm", "start"]
 
1
  FROM node:18
2
 
3
+ # Install git
4
+ RUN apt-get update && apt-get install -y git
5
+
6
+ # Clone the repository
7
  RUN git clone https://github.com/lezzthanthree/SEKAI-Stories.git /app
8
 
9
  WORKDIR /app
 
11
  # Install dependencies
12
  RUN npm install
13
 
14
+ # Build the project
15
+ RUN npm run build
16
+
17
+ # Install a simple static file server
18
+ RUN npm install -g serve
19
 
20
+ # Expose the port
21
  EXPOSE 7860
22
 
23
+ # Serve the static files
24
+ CMD ["serve", "-s", "dist", "-l", "7860"]