FabienDanieau commited on
Commit
5e1d569
·
1 Parent(s): 47b07cc

fix invalid host header?

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -13,8 +13,9 @@ RUN npm install
13
  # Copy the rest of the application source code
14
  COPY src/ ./
15
 
16
- #EXPOSE 9090
17
 
18
- # Start the application with host 0.0.0.0 for Docker networking
19
- CMD ["npm", "start"]
20
- #, "--", "--host", "0.0.0.0"]
 
 
 
13
  # Copy the rest of the application source code
14
  COPY src/ ./
15
 
 
16
 
17
+ # Expose the port expected by Hugging Face Spaces
18
+ EXPOSE 7860
19
+
20
+ # Start the application on 0.0.0.0 and use the port from $PORT (default 7860), allow all hosts
21
+ CMD ["sh", "-c", "npm start -- --host 0.0.0.0 --port ${PORT:-7860} --allowed-hosts all"]