-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
37 lines (25 loc) · 843 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use Python 3.10 as base image
FROM python:3.10-slim
# Install system dependencies
RUN apt-get update && apt-get install -y default-libmysqlclient-dev build-essential pkg-config
# Install Poetry
RUN pip install poetry
# Set working directory
WORKDIR /app
# Copy Poetry configuration files
COPY pyproject.toml poetry.lock ./
# Configure Poetry to not create virtual environment inside container
RUN poetry config virtualenvs.create false
# Install dependencies
RUN poetry install --no-dev --no-interaction --no-ansi
RUN playwright install
RUN playwright install-deps
# Copy application files
COPY main.py .
COPY static/ static/
# Create directory for temporary files
RUN mkdir -p /app/output
# Expose port 8000
EXPOSE 8000
# Set the entry command
CMD ["poetry", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]