tfrere commited on
Commit
2baeef7
·
1 Parent(s): 3c1419a

update prod api port

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. frontend/server.js +1 -1
Dockerfile CHANGED
@@ -62,7 +62,7 @@ ENV HF_HOME=/app/.cache \
62
 
63
  # Note: HF_TOKEN should be provided at runtime, not build time
64
  USER user
65
- EXPOSE 7860
66
 
67
  # Start both servers with wait-for
68
  CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 7861 & while ! nc -z localhost 7861; do sleep 1; done && cd frontend && npm run serve"]
 
62
 
63
  # Note: HF_TOKEN should be provided at runtime, not build time
64
  USER user
65
+ EXPOSE 7860 7861
66
 
67
  # Start both servers with wait-for
68
  CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 7861 & while ! nc -z localhost 7861; do sleep 1; done && cd frontend && npm run serve"]
frontend/server.js CHANGED
@@ -14,7 +14,7 @@ const isProduction = process.env.NODE_ENV === "production";
14
 
15
  // Get the backend URL from environment or use localhost in development
16
  const backendUrl = isProduction
17
- ? "https://yourbench-yourbench-simple-demo.hf.space" // URL de production (backend space)
18
  : `http://127.0.0.1:${apiPort}`; // URL de développement
19
 
20
  // Enable CORS for all routes
 
14
 
15
  // Get the backend URL from environment or use localhost in development
16
  const backendUrl = isProduction
17
+ ? `http://localhost:${apiPort}` // Même conteneur en production
18
  : `http://127.0.0.1:${apiPort}`; // URL de développement
19
 
20
  // Enable CORS for all routes