File size: 1,042 Bytes
ae6949f
1b10823
c976171
1b10823
 
 
 
 
0cbddd4
1b10823
 
8301bac
1b10823
2f566e4
ae6949f
c976171
2f566e4
c976171
2f566e4
 
 
c976171
2f566e4
 
c976171
5b307c4
2f566e4
1b10823
 
2f566e4
ae6949f
 
0cbddd4
2f566e4
1b10823
 
2f566e4
1b10823
 
2f566e4
 
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
40
41
42
FROM python:3.9-slim

# Instalar dependencias del sistema necesarias para OCR y frontend
RUN apt-get update && apt-get install -y \
    ghostscript \
    tesseract-ocr \
    poppler-utils \
    libxml2 \
    unpaper \
    nodejs \
    npm \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# Configurar el directorio de trabajo para el frontend
WORKDIR /app/frontend

# Copiar el archivo package.json y el lockfile para instalar dependencias
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install  # Instalaci贸n de dependencias de Node.js

# Copiar todo el c贸digo fuente del frontend
COPY frontend/ ./

# Construir el frontend
RUN npm run build  # Construir el frontend

# Configurar el directorio de trabajo para el backend
WORKDIR /app

# Instalar las dependencias de Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copiar todo el c贸digo del backend
COPY . .

# Exponer el puerto para la aplicaci贸n
EXPOSE 7860

# Comando para ejecutar la aplicaci贸n
CMD ["python", "app.py"]