Amin23 commited on
Commit
19c50c3
·
1 Parent(s): 59dda19

initial commit

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. backend/app/core/config.py +1 -1
  3. backend/main.py +1 -1
Dockerfile CHANGED
@@ -24,7 +24,7 @@
24
  COPY backend/ ./
25
 
26
  # Static export from previous stage
27
- COPY --from=frontend-build /app/frontend/out /app/frontend_out
28
 
29
  # Create folders & DB file and make them writable
30
  # Directories /tmp/uploads and /tmp/pdf_chatbot.db are used and should be writable by default
 
24
  COPY backend/ ./
25
 
26
  # Static export from previous stage
27
+ COPY --from=frontend-build /app/frontend/out /app/backend/frontend/out
28
 
29
  # Create folders & DB file and make them writable
30
  # Directories /tmp/uploads and /tmp/pdf_chatbot.db are used and should be writable by default
backend/app/core/config.py CHANGED
@@ -24,7 +24,7 @@ class Settings(BaseSettings):
24
  ANTHROPIC_API_KEY: Optional[str] = None
25
 
26
  # File Storage
27
- UPLOAD_DIR: str = "/tmp/uploads" # Explicitly set to a writable temporary directory
28
  MAX_FILE_SIZE: int = 10 * 1024 * 1024 # 10MB
29
  ALLOWED_EXTENSIONS: list = [".pdf"]
30
 
 
24
  ANTHROPIC_API_KEY: Optional[str] = None
25
 
26
  # File Storage
27
+ UPLOAD_DIR: str = os.environ.get("UPLOAD_DIR", "/tmp/uploads") # Use os.environ.get with /tmp default
28
  MAX_FILE_SIZE: int = 10 * 1024 * 1024 # 10MB
29
  ALLOWED_EXTENSIONS: list = [".pdf"]
30
 
backend/main.py CHANGED
@@ -49,7 +49,7 @@ app.include_router(
49
  )
50
 
51
  # Serve static frontend (exported Next.js) at root
52
- frontend_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "frontend", "out"))
53
 
54
  # Log frontend path and existence
55
  logging.info(f"Calculated frontend_path: {frontend_path}")
 
49
  )
50
 
51
  # Serve static frontend (exported Next.js) at root
52
+ frontend_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "frontend", "out"))
53
 
54
  # Log frontend path and existence
55
  logging.info(f"Calculated frontend_path: {frontend_path}")