eberhenriquez94 commited on
Commit
2f566e4
verified
1 Parent(s): 56947ad
Files changed (1) hide show
  1. Dockerfile +13 -9
Dockerfile CHANGED
@@ -11,27 +11,31 @@ RUN apt-get update && apt-get install -y \
11
  npm \
12
  && apt-get clean && rm -rf /var/lib/apt/lists/*
13
 
14
- # Configurar directorio de trabajo para el frontend
15
  WORKDIR /app/frontend
16
 
17
- # Instalar dependencias y construir el frontend
18
  COPY frontend/package.json frontend/package-lock.json* ./
19
- RUN npm install
 
 
20
  COPY frontend/ ./
 
 
21
  RUN npm run build # Construir el frontend
22
 
23
- # Configurar directorio de trabajo para el backend
24
  WORKDIR /app
25
 
26
- # Instalar dependencias de Python
27
  COPY requirements.txt .
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
- # Copiar todo el c贸digo
31
  COPY . .
32
 
33
- # Exponer el puerto de la aplicaci贸n
34
  EXPOSE 7860
35
 
36
- # Comando para iniciar la aplicaci贸n
37
- CMD ["python", "app.py"]
 
11
  npm \
12
  && apt-get clean && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Configurar el directorio de trabajo para el frontend
15
  WORKDIR /app/frontend
16
 
17
+ # Copiar el archivo package.json y el lockfile para instalar dependencias
18
  COPY frontend/package.json frontend/package-lock.json* ./
19
+ RUN npm install # Instalaci贸n de dependencias de Node.js
20
+
21
+ # Copiar todo el c贸digo fuente del frontend
22
  COPY frontend/ ./
23
+
24
+ # Construir el frontend
25
  RUN npm run build # Construir el frontend
26
 
27
+ # Configurar el directorio de trabajo para el backend
28
  WORKDIR /app
29
 
30
+ # Instalar las dependencias de Python
31
  COPY requirements.txt .
32
  RUN pip install --no-cache-dir -r requirements.txt
33
 
34
+ # Copiar todo el c贸digo del backend
35
  COPY . .
36
 
37
+ # Exponer el puerto para la aplicaci贸n
38
  EXPOSE 7860
39
 
40
+ # Comando para ejecutar la aplicaci贸n
41
+ CMD ["python", "app.py"]