From ced67a02b40c8af327737125348c1c09ef7f2bad Mon Sep 17 00:00:00 2001 From: Eduardo Lopes <155753879+eduardolopesx03@users.noreply.github.com> Date: Tue, 10 Feb 2026 14:14:26 -0300 Subject: [PATCH] docs: esclarecer build do frontend via docker no VPS --- README.md | 20 ++++++++++++++++++-- docs/DEPLOY_VPS.md | 5 ++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ba89c0..6127343 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,29 @@ ng generate --help ## Building +### Local (com Node instalado) + To build the project run: ```bash -ng build +npm run build ``` -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. +### VPS/Servidor sem Node no host (recomendado neste projeto) + +Execute o build **dentro do container Docker do frontend**: + +```bash +docker compose -f docker-compose.frontend.yml run --rm frontend-builder +``` + +Se quiser rodar exatamente o comando `npm run build` dentro do container: + +```bash +docker compose -f docker-compose.frontend.yml run --rm frontend-builder sh -lc "npm run build" +``` + +Os artefatos serão gerados em `dist/line-gestao-frontend`. ## Running unit tests diff --git a/docs/DEPLOY_VPS.md b/docs/DEPLOY_VPS.md index 1a3ea86..b6fdbd1 100644 --- a/docs/DEPLOY_VPS.md +++ b/docs/DEPLOY_VPS.md @@ -47,9 +47,12 @@ export const environment = { }; EOT -# 3) build de produção via container Node +# 3) build de produção via container Node (não rodar npm no host) docker compose -f docker-compose.frontend.yml run --rm frontend-builder +# opcional: equivalente a executar `npm run build` dentro do container +# docker compose -f docker-compose.frontend.yml run --rm frontend-builder sh -lc "npm run build" + # 4) validar saída estática ls -lah dist/line-gestao-frontend/browser ```