forked from VolunChain/VolunChain-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 660 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 660 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
# Usa la imagen oficial de Node.js
FROM node:18
# Instala el cliente de PostgreSQL para que pg_isready esté disponible
RUN apt-get update && apt-get install -y postgresql-client
# Establece el directorio de trabajo
WORKDIR /app
# Copia los archivos necesarios para instalar dependencias
COPY package*.json ./
COPY tsconfig.json ./
# Instala dependencias
RUN npm install
# Copia todo el código al contenedor
COPY . .
# Compila TypeScript
RUN npm run build
# Copia y da permisos al entrypoint
RUN chmod +x /app/entrypoint.sh
# Ejecuta las migraciones y levanta la app
ENTRYPOINT ["/app/entrypoint.sh"]
# Expone el puerto que usará la app
EXPOSE 3000