docs: esclarecer build do frontend via docker no VPS

This commit is contained in:
Eduardo Lopes 2026-02-10 14:14:26 -03:00
parent 7f0abc2da0
commit ced67a02b4
2 changed files with 22 additions and 3 deletions

View File

@ -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

View File

@ -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
```