Fix Docker file for backend so webserver properly listens and proxies connections

This commit is contained in:
Gabriel A. Devenyi
2024-05-23 14:59:10 -04:00
parent c3fe4a7f9e
commit d0235ed27a
3 changed files with 26 additions and 1 deletions

View File

@@ -8,4 +8,4 @@ RUN npm install -g @angular/cli
RUN npm install
CMD ["npm", "start"]
CMD ["npm", "run", "start-docker"]

View File

@@ -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",

View 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"
}
}