diff --git a/angular.json b/angular.json index 1e2976c20f2a68cba97dfa4dd2599d8b68b9a41f..0c97b0fef492b4b4cb207f7109a096c862f5a8cf 100644 --- a/angular.json +++ b/angular.json @@ -73,6 +73,29 @@ "vendorChunk": false, "buildOptimizer": true }, + "production-docker": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.docker.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + }, "build": { "budgets": [ { diff --git a/docker/Dockerfile b/docker/Dockerfile index cc618157761647cb660e617e583d51f97b2db9b4..b8299b513b2c5c2e36df7c3c65e41fabd30001ca 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,7 @@ COPY . /app RUN ng test --watch=false -RUN ng build --output-path=dist +RUN ng build -c production-docker --output-path=dist EXPOSE 4200