d3evil4 commited on
Commit
c25010e
·
verified ·
1 Parent(s): 030cf68

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -32
Dockerfile CHANGED
@@ -1,32 +1,22 @@
1
- # Use the official Python image as base
2
- FROM python:3.11-slim
3
-
4
- # Install OS dependencies for Playwright and Chromium
5
- RUN apt-get update && apt-get install -y \
6
- wget gnupg curl unzip \
7
- libnss3 libatk-bridge2.0-0 libgtk-3-0 \
8
- libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 \
9
- libxi6 libxtst6 libxrandr2 libcups2 libasound2 \
10
- libpangocairo-1.0-0 libpango-1.0-0 libgbm1 \
11
- libxshmfence1 libatspi2.0-0 \
12
- && apt-get clean \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Set work directory
16
- WORKDIR /app
17
-
18
- # Copy project files
19
- COPY . .
20
-
21
- # Install Python dependencies
22
- RUN pip install --upgrade pip
23
- RUN pip install fastapi uvicorn playwright nest_asyncio
24
-
25
- # Install Playwright browsers (Chromium only)
26
- RUN playwright install --with-deps chromium
27
-
28
- # Expose the FastAPI port
29
- EXPOSE 8000
30
-
31
- # Command to run the FastAPI app
32
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ # Use the official Python image as base
2
+ FROM python:3.11-slim
3
+
4
+ # Install OS dependencies for Playwright and Chromium
5
+ RUN apt-get update && apt-get install -y \
6
+ wget gnupg curl unzip \
7
+
8
+ # Set work directory
9
+ WORKDIR /app
10
+
11
+ # Copy project files
12
+ COPY . .
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --upgrade pip
16
+ RUN pip install fastapi uvicorn playwright nest_asyncio
17
+
18
+ # Install Playwright browsers (Chromium only)
19
+ RUN playwright install --with-deps chromium
20
+
21
+ COPY --chown=user . /app
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]