generated from autoblog/Corretor_Imoveis
Add optimized Dockerfile for deployment
This commit is contained in:
parent
7cf05467b4
commit
2175c1113e
1 changed files with 21 additions and 0 deletions
21
Template-02/Dockerfile
Normal file
21
Template-02/Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g serve
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
EXPOSE 4321
|
||||
|
||||
CMD ["serve", "-s", "dist", "-l", "4321"]
|
||||
Loading…
Reference in a new issue