tfrere commited on
Commit
855b7ce
·
1 Parent(s): 2baeef7
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. frontend/server.js +1 -1
Dockerfile CHANGED
@@ -65,4 +65,4 @@ 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"]
 
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 127.0.0.1 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
- ? `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
 
14
 
15
  // Get the backend URL from environment or use localhost in development
16
  const backendUrl = isProduction
17
+ ? `http://127.0.0.1:${apiPort}` // Même conteneur en production (IPv4 explicite)
18
  : `http://127.0.0.1:${apiPort}`; // URL de développement
19
 
20
  // Enable CORS for all routes