build docker image with prod environment
MODIFY
Dockerfile
Dockerfile
@@ -8,7 +8,7 @@ RUN npm install
#copy the rest of the project into the image
COPY . .
-RUN npm run build
+RUN npm run build-production
# Stage 2
FROM nginx:1.13.12-alpine

MODIFY
docker/nginx.conf
docker/nginx.conf
server {
- #listen 80;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
ssl_certificate /etc/ssl/certs/tls.crt;

MODIFY
package.json
package.json
"ng": "ng",
"start": "ng serve",
"build": "ng build",
+ "build-production": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"hammerjs": "^2.0.8",
"keycloak-angular": "^7.0.1",
"keycloak-js": "^5.0.0",
+ "ngx-logger": "^4.0.7",
"rxjs": "^6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"

build docker image with prod environment