-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 843 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
# Usa una imagen base con Node.js y Python 3.11
FROM nikolaik/python-nodejs:python3.11-nodejs18
# Instala ffmpeg
RUN apt-get update && \
apt-get install -y ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Directorio de trabajo
WORKDIR /app
# Copia los archivos de package.json primero para aprovechar el caché de Docker
COPY package*.json ./
# Instala las dependencias de Node.js
RUN npm install
# Actualiza pip e instala wheel
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
# Copia requirements.txt y instala dependencias de Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copia el resto del código
COPY . .
# Crea el directorio para los modelos
RUN mkdir -p models
# Expone el puerto
EXPOSE 3000
# Comando para iniciar la aplicación
CMD ["npm", "start"]