diff --git a/security-c4po-angular/Dockerfile b/security-c4po-angular/Dockerfile index d8556fc..d963d8b 100644 --- a/security-c4po-angular/Dockerfile +++ b/security-c4po-angular/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app ENV PATH /app/node_modules/.bin:$PATH # increase memory limit to avoid "heap out of memory"-error -#TODO investigate on root cause for "heap out of memory"-error +# TODO investigate on root cause for "heap out of memory"-error ENV NODE_OPTIONS="--max_old_space_size=4096" # install and cache app dependencies @@ -20,4 +20,4 @@ RUN npm install -g @angular/cli@12.2.17 COPY . /app # start app -CMD ng serve --host 0.0.0.0 +CMD ng serve -c compose --host 0.0.0.0 diff --git a/security-c4po-angular/angular.json b/security-c4po-angular/angular.json index 3803805..106422a 100644 --- a/security-c4po-angular/angular.json +++ b/security-c4po-angular/angular.json @@ -73,6 +73,34 @@ "maximumWarning": "6kb" } ] + }, + "compose": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.compose.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "3mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ] } }, "defaultConfiguration": "" @@ -85,6 +113,9 @@ "configurations": { "production": { "browserTarget": "security-c4po-angular:build:production" + }, + "compose": { + "browserTarget": "security-c4po-angular:build:compose" } } }, diff --git a/security-c4po-angular/src/environments/environment.compose.ts b/security-c4po-angular/src/environments/environment.compose.ts new file mode 100644 index 0000000..fb539ed --- /dev/null +++ b/security-c4po-angular/src/environments/environment.compose.ts @@ -0,0 +1,11 @@ +export const environment = { + production: false, + + // keycloak + keycloakURL: 'http://localhost:8888/auth', + keycloakrealm: 'c4po_realm_local', + keycloakclientId: 'c4po_local', + + // backend service + apiEndpoint: 'http://localhost:8443', +}; diff --git a/security-c4po-api/wait-for-keycloak.sh b/security-c4po-api/wait-for-keycloak.sh old mode 100644 new mode 100755