From 1c20a67768c375140167f8c7cb5941d72c4f6923 Mon Sep 17 00:00:00 2001 From: Francisco J Lopez-Pellicer Date: Sun, 4 Oct 2026 19:23:32 +0200 Subject: [PATCH] docs: state which build compiles environment.ts docker-dev has no file replacement, so it compiles environment.ts. Only the production configuration compiles the generated prod file. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 358d5af8..31e48b8f 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ The application supports three build configurations: | Configuration | Use Case | API URL | Source Maps | Production | |---------------|----------|---------|-------------|------------| | **development** | Local `ng serve` | `http://localhost:9000/backend` | Yes | false | -| **docker-dev** | Docker debugging | Template-based (`${PUBLIC_BASE_PATH}backend`) | Yes | false | +| **docker-dev** | Docker debugging | `http://localhost:9000/backend` (`environment.ts`) | Yes | false | | **production** | Docker production | Template-based (`${PUBLIC_BASE_PATH}backend`) | No | true | #### Environment Files @@ -146,10 +146,10 @@ The application supports three build configurations: ``` src/environments/ ├── environment.ts # Local development (default) -└── environment.prod.ts # Production/Docker builds +└── environment.prod.ts # Production file replacement ``` -The `docker-dev` and `production` configurations both use `environment.prod.ts`, which is generated from `environment.prod.ts.template` during Docker builds via `envsubst`. +`angular.json` gives `fileReplacements` to `production` (`environment.prod.ts`) and `e2e` (`environment.e2e.ts`). `development` and `docker-dev` have none, so both compile `environment.ts`. `front/Dockerfile` writes `environment.prod.ts` from `environment.prod.ts.template` with `envsubst`, then runs `--configuration=docker-dev` when `ENVIRONMENT=development` and `--configuration=production` otherwise. Only the production configuration compiles that generated file. ### Environment Variables @@ -176,7 +176,7 @@ npm start # Or explicitly: npm run build -- --configuration=development -# Docker debugging (uses environment.prod.ts, with source maps) +# Docker debugging (compiles environment.ts, with source maps) npm run build -- --configuration=docker-dev # Production build (uses environment.prod.ts, optimized)