salomonsky commited on
Commit
994769c
verified
1 Parent(s): 792296a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -26
Dockerfile CHANGED
@@ -1,40 +1,19 @@
1
- # Imagen base para Node.js
2
- FROM node:16 AS frontend
3
-
4
- # Establecer el directorio de trabajo
5
- WORKDIR /app
6
-
7
- # Copiar archivos de frontend
8
- COPY package.json package-lock.json ./
9
-
10
- # Instalar dependencias de Node.js
11
- RUN npm install
12
-
13
- # Copiar el c贸digo fuente de React
14
- COPY . .
15
-
16
- # Construir el frontend
17
- RUN npm run build
18
-
19
  # Imagen base para Python (Streamlit)
20
- FROM python:3.8 AS backend
21
 
22
  # Establecer el directorio de trabajo
23
  WORKDIR /app
24
 
25
- # Copiar las dependencias de Python
26
  COPY requirements.txt ./
27
 
28
- # Instalar dependencias de Python
29
  RUN pip install --no-cache-dir -r requirements.txt
30
 
31
- # Copiar c贸digo Python (backend) y el frontend construido
32
- COPY --from=frontend /app/build /app/frontend
33
-
34
- # Copiar el archivo de Streamlit
35
  COPY app.py ./
36
 
37
- # Exponer el puerto para Streamlit
38
  EXPOSE 8501
39
 
40
  # Comando para ejecutar Streamlit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Imagen base para Python (Streamlit)
2
+ FROM python:3.8-slim AS backend
3
 
4
  # Establecer el directorio de trabajo
5
  WORKDIR /app
6
 
7
+ # Copiar solo las dependencias de Python para aprovechar el cache
8
  COPY requirements.txt ./
9
 
10
+ # Instalar las dependencias de Python
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copiar el c贸digo fuente del backend
 
 
 
14
  COPY app.py ./
15
 
16
+ # Exponer el puerto de Streamlit
17
  EXPOSE 8501
18
 
19
  # Comando para ejecutar Streamlit