Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
update
Browse files- Dockerfile +1 -1
- 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
|
|
|
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://
|
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
|