diff --git a/worklenz-frontend/Dockerfile b/worklenz-frontend/Dockerfile index fb8f7d91..972d90b2 100644 --- a/worklenz-frontend/Dockerfile +++ b/worklenz-frontend/Dockerfile @@ -8,4 +8,4 @@ RUN npm install -g @angular/cli RUN npm install -CMD ["npm", "start"] +CMD ["npm", "run", "start-docker"] diff --git a/worklenz-frontend/package.json b/worklenz-frontend/package.json index 65432dce..efc47ba1 100644 --- a/worklenz-frontend/package.json +++ b/worklenz-frontend/package.json @@ -4,6 +4,7 @@ "scripts": { "ng": "ng", "start": "ng serve --proxy-config proxy.config.json --disable-host-check", + "start-docker": "ng serve --proxy-config proxy-docker.config.json --disable-host-check --host 0.0.0.0", "build": "ng build --extract-licenses --common-chunk --delete-output-path --output-hashing=all", "watch": "ng build --watch --configuration development", "test": "ng test", diff --git a/worklenz-frontend/proxy-docker.config.json b/worklenz-frontend/proxy-docker.config.json new file mode 100644 index 00000000..3d88dab7 --- /dev/null +++ b/worklenz-frontend/proxy-docker.config.json @@ -0,0 +1,24 @@ +{ + "/api": { + "target": "http://backend:3000/", + "headers": { + "language": "en", + "Accept": "application/json", + "Content-Type": "application/json; charset=utf-8" + }, + "secure": false, + "changeOrigin": true, + "logLevel": "debug" + }, + "/secure": { + "target": "http://backend:3000/", + "headers": { + "language": "en", + "Accept": "application/json", + "Content-Type": "application/json; charset=utf-8" + }, + "secure": false, + "changeOrigin": true, + "logLevel": "debug" + } +}