Baskar2005 commited on
Commit
761259b
·
verified ·
1 Parent(s): 0024ef8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies (wget, gnupg for Playwright)
4
  RUN apt-get update && apt-get install -y \
5
  wget \
6
  gnupg \
@@ -8,17 +8,15 @@ RUN apt-get update && apt-get install -y \
8
 
9
  WORKDIR /app
10
 
11
- # Install Python deps
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Install Playwright Browsers
16
  RUN pip install playwright
17
  RUN playwright install --with-deps chromium
18
 
19
- # Copy app code
20
  COPY . .
21
 
22
- # Start Server (Render uses PORT env var)
23
- # Use ${PORT:-10000} to set a default if the variable is missing
24
  CMD gunicorn app:app --bind 0.0.0.0:${PORT:-10000} --timeout 120
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  wget \
6
  gnupg \
 
8
 
9
  WORKDIR /app
10
 
11
+ # Copy files
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Install Playwright and Browsers
16
  RUN pip install playwright
17
  RUN playwright install --with-deps chromium
18
 
 
19
  COPY . .
20
 
21
+ # Use ${PORT:-10000} to prevent the "Error: '' is not a valid port number"
 
22
  CMD gunicorn app:app --bind 0.0.0.0:${PORT:-10000} --timeout 120