broadfield-dev commited on
Commit
f701d80
·
verified ·
1 Parent(s): 9c4506a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -5
Dockerfile CHANGED
@@ -1,10 +1,10 @@
1
  FROM python:3.10-slim
2
 
3
- # Install wkhtmltopdf and dependencies, including certificates and a virtual display
4
  RUN apt-get update && apt-get install -y \
5
  wkhtmltopdf \
6
  ca-certificates \
7
- xvfb \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  WORKDIR /app
@@ -15,6 +15,5 @@ COPY . .
15
  # Ensure the temp directory is writable
16
  RUN mkdir -p /app/temp && chmod -R 777 /app/temp
17
 
18
- EXPOSE 7860
19
- # Run the app inside the virtual display
20
- CMD ["xvfb-run", "python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install wkhtmltopdf and necessary dependencies for fonts and networking
4
  RUN apt-get update && apt-get install -y \
5
  wkhtmltopdf \
6
  ca-certificates \
7
+ fontconfig \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  WORKDIR /app
 
15
  # Ensure the temp directory is writable
16
  RUN mkdir -p /app/temp && chmod -R 777 /app/temp
17
 
18
+ ENV PORT=7860
19
+ CMD ["python", "app.py"]