-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (22 loc) · 701 Bytes
/
Dockerfile
File metadata and controls
38 lines (22 loc) · 701 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
37
38
# Fase de construção (builder)
# FROM node:18 AS builder
# WORKDIR /app
# COPY package*.json tsconfig.json ./
# RUN npm install
# COPY . .
# RUN npm run build
FROM node:18-alpine
WORKDIR /app
COPY package*.json tsconfig.json ./
RUN npm install
COPY . .
EXPOSE 1000
CMD ["npm", "run", "dev"]
# As linhas abaixo são agora comentadas, pois não serão mais usadas:
# Copiar os arquivos compilados da fase builder
# COPY --from=builder /app/dist ./dist
# COPY --from=builder /app/package*.json ./
# Instalar apenas as dependências de produção
# RUN npm install --only=production
# Rodar o servidor compilado na fase final (não será utilizado agora)
# CMD ["node", "dist/server.js"]