- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
Latest commit
23 lines (17 loc) · 515 Bytes
/
Copy pathdockerfile
File metadata and controls
23 lines (17 loc) · 515 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use la imagen base de Node.js en Alpine
FROM node:16.20.2-alpine
# Establecer el directorio de trabajo dentro del contenedor
WORKDIR /usr/src/app
# Copiar los archivos necesarios al contenedor
# COPY package*.json ./
# COPY index.js ./
# COPY static ./static
COPY . .
# Establecer la variable de entorno MONGODB_URI
# ENV MONGODB_URI
# Instalar las dependencias
RUN npm install
# Exponer el puerto que la aplicación va a utilizar
EXPOSE 3001
# Comando para ejecutar la aplicación
CMD ["node", "index.js"]