prasanth.thangavel commited on
Commit
b53345f
·
1 Parent(s): 979c1fa

Update to resolve deployment issue

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -5,6 +5,8 @@ FROM python:3.11-slim
5
  RUN useradd -m -u 1000 user
6
  USER user
7
  ENV PATH="/home/user/.local/bin:$PATH"
 
 
8
 
9
  # Set working directory for app
10
  WORKDIR /app
@@ -19,5 +21,6 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
  COPY --chown=user . .
20
 
21
  # Run gunicorn server on port 7860
22
- # Format: gunicorn -b host:port module_name:app_instance
23
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
 
 
5
  RUN useradd -m -u 1000 user
6
  USER user
7
  ENV PATH="/home/user/.local/bin:$PATH"
8
+ ENV FLASK_APP=app.py
9
+ ENV FLASK_ENV=production
10
 
11
  # Set working directory for app
12
  WORKDIR /app
 
21
  COPY --chown=user . .
22
 
23
  # Run gunicorn server on port 7860
24
+ # CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"] # Format: gunicorn -b host:port module_name:app_instance
25
+
26
+ CMD ["gunicorn", "--log-level", "debug", "--bind", "0.0.0.0:7860", "app:app"] # Use 0.0.0.0 to bind to all interfaces