-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 860 Bytes
/
Dockerfile
File metadata and controls
39 lines (31 loc) · 860 Bytes
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
38
39
# Imagen base
FROM python:3.12-slim-bookworm
# Evita preguntas interactivas
ENV DEBIAN_FRONTEND=noninteractive
# Instalar dependencias del sistema para WeasyPrint
RUN apt-get update && apt-get install -y \
build-essential \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libcairo2 \
libgdk-pixbuf2.0-0 \
libffi-dev \
libxml2 \
libxslt1.1 \
libjpeg62-turbo \
fonts-liberation \
fonts-dejavu \
libfontconfig1 \
libfreetype6 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Crear carpeta para la app
WORKDIR /app
# Instalar dependencias de Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copiar el resto del código
COPY . .
# Exponer el puerto (si usas Uvicorn)
EXPOSE 8000
# Comando para ejecutar la app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]