vendredi 8 juillet 2016

Ember in docker with nginx can't reach server container

I've got a strange issue where my ember application can't reach the backend server running in a different docker container (on the same host though).

Both containers are running and can talk to each other. I can reach the server from the web container using docker-compose exec web curl http://server:8080/token for example.

However whenever trying to make a request to the server via ember I get OPTIONS http://server:8080/token net::ERR_NAME_NOT_RESOLVED.

In my environment.js file I've set the api endpoint the same as used above for the curl test http://server:8080/

I'm wondering if my nginx config could be the culprit here somehow?

server {
  listen 80;
  root /usr/share/nginx/html;

  location / {
    try_files $uri /index.html;
  }
}

It's very basic, and I can reach the ember application routes correctly.

Is there something else I need to do when deploying the ember app?

More information about my docker setup can be found in this question




Aucun commentaire:

Enregistrer un commentaire