From f2d4f423673972b35ca0e3c2a83ff49e310de4d5 Mon Sep 17 00:00:00 2001 From: Bxio Date: Fri, 4 Jul 2025 13:41:38 +0000 Subject: [PATCH] Modificar Dockerfile --- Dockerfile | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3b9ac8..571ac2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,20 @@ -# Use an official Node runtime as a parent image -FROM node:16 +# Imagem base +FROM node:20-alpine -# Set the working directory to /app +# Diretório de trabalho WORKDIR /app -# Copy the package.json and package-lock.json to the working directory -COPY ./package*.json ./ +# Copiar package.json e package-lock.json +COPY package*.json ./ -# Install the dependencies +# Instalar dependências RUN npm install -# Copy the remaining application files to the working directory +# Copiar todo o resto do código COPY . . -# Build the application -RUN npm run build +# Expor a porta que o Vite usa +EXPOSE 5173 -# Expose port 3000 for the application -EXPOSE 3000 - -# Start the application -CMD [ "npm", "run", "start" ] \ No newline at end of file +# Comando para iniciar em modo de desenvolvimento +CMD ["npm", "run", "dev", "--", "--host"]