tfrere commited on
Commit
3c1419a
·
1 Parent(s): 0f137f3

remove docker dev and update backend prod url

Browse files
backend/Dockerfile.dev DELETED
@@ -1,25 +0,0 @@
1
- FROM python:3.12-slim
2
-
3
- WORKDIR /app
4
-
5
- # Install required system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- && rm -rf /var/lib/apt/lists/*
9
-
10
- # Install poetry
11
- RUN pip install poetry
12
-
13
- # Copy Poetry configuration files
14
- COPY pyproject.toml poetry.lock* ./
15
-
16
- # Install dependencies
17
- RUN poetry config virtualenvs.create false && \
18
- poetry install --no-interaction --no-ansi --no-root
19
-
20
- # Environment variables configuration for logs
21
- ENV PYTHONUNBUFFERED=1
22
- ENV LOG_LEVEL=INFO
23
-
24
- # In dev, mount volume directly
25
- CMD ["uvicorn", "app.asgi:app", "--host", "0.0.0.0", "--port", "7860", "--reload", "--log-level", "warning", "--no-access-log"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/Dockerfile.dev DELETED
@@ -1,15 +0,0 @@
1
- FROM node:18
2
-
3
- WORKDIR /app
4
-
5
- # Install required global dependencies
6
- RUN npm install -g react-scripts
7
-
8
- # Copy package.json and package-lock.json
9
- COPY package*.json ./
10
-
11
- # Install project dependencies
12
- RUN npm install
13
-
14
- # Volume will be mounted here, no need for COPY
15
- CMD ["npm", "start"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-backend.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
+ ? "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