Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ 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

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

Expand All @@ -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)
Expand Down
Loading