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