Fix Docker file for backend so webserver properly listens and proxies connections
This commit is contained in:
@@ -8,4 +8,4 @@ RUN npm install -g @angular/cli
|
|||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
CMD ["npm", "start"]
|
CMD ["npm", "run", "start-docker"]
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --proxy-config proxy.config.json --disable-host-check",
|
"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",
|
"build": "ng build --extract-licenses --common-chunk --delete-output-path --output-hashing=all",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
|
|||||||
24
worklenz-frontend/proxy-docker.config.json
Normal file
24
worklenz-frontend/proxy-docker.config.json
Normal file
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user