WanIrfan commited on
Commit
07e67e5
·
verified ·
1 Parent(s): 992c85d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -13,14 +13,13 @@ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
  COPY . .
15
 
16
- # --- HERE IS THE FIX ---
17
  # Create writable directories for the database, uploads, AND sessions
18
  RUN mkdir -p /app/chroma_db && chmod -R 777 /app/chroma_db
19
  RUN mkdir -p /app/Uploads && chmod -R 777 /app/Uploads
20
  RUN mkdir -p /app/flask_session && chmod -R 777 /app/flask_session
21
- # -----------------------
22
 
23
  EXPOSE 7860
24
 
25
- # Point to app_1.py
26
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--timeout", "300"]
 
 
13
 
14
  COPY . .
15
 
 
16
  # Create writable directories for the database, uploads, AND sessions
17
  RUN mkdir -p /app/chroma_db && chmod -R 777 /app/chroma_db
18
  RUN mkdir -p /app/Uploads && chmod -R 777 /app/Uploads
19
  RUN mkdir -p /app/flask_session && chmod -R 777 /app/flask_session
 
20
 
21
  EXPOSE 7860
22
 
23
+ # --- THE FIX IS HERE ---
24
+ # We add "--workers 1" to force a single worker, which fixes filesystem session bugs.
25
+ CMD ["gunicorn", "--workers", "1", "-b", "0.0.0.0:7860", "app_1:app", "--timeout", "300"]