Enviar arquivos para "/"
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
# Etapa 1 - extrair e buildar a aplicação
|
||||
FROM node:18 as build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copiar e descompactar o ZIP do repositório
|
||||
COPY app.zip /app/
|
||||
RUN apt-get update && apt-get install -y unzip && \
|
||||
unzip app.zip -d . && \
|
||||
rm app.zip
|
||||
|
||||
# Instalar dependências e buildar o projeto
|
||||
RUN npm install && npm run build
|
||||
|
||||
# Etapa 2 - imagem final com nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
RUN rm -f /usr/share/nginx/html/index.html.orig 2>/dev/null || true
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user