Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

379
Views
El contenedor angular alojado por el servidor web NGINX no puede llamar a un WebApi en otro servidor

DockerFile de Angular

 # stage 1 FROM node:latest as node WORKDIR /usr/src/app COPY package.json /usr/src/app COPY proxy.conf.json /usr/src/app RUN npm install COPY . /usr/src/app #CMD ng serve --host 0.0.0.0 RUN npm run build #ENTRYPOINT npm proxy # Stage 2 FROM nginx:1.13.12-alpine COPY --from=node /usr/src/app/dist/miniRws /usr/share/nginx/html COPY ./nginx.conf /etc/nginx/conf.d/default.conf

nginx.config

 server { listen 80; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html =404; } }

proxy.config

 { "/api1": { "target": "http://examwebapicontainer", "secure": false, "logLevel": "debug", "changeOrigin": true } }

paquete.json : parcial

 "scripts": { "ng": "ng", "start": "ng serve --proxy-config proxy.config.json", "proxy": "ng serve --proxy-config proxy.conf.json --host 0.0.0.0", "build": "ng build" }

Me dicen que tenemos que agregar de alguna manera

proxy_pass http://examwebapicontainer en el archivo nginx.conf

¿Alguien puede ayudar con la edición de los archivos de configuración para que pueda llamar a WebApi desde el contenedor angular?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!