Hi everyone, My first post here, so if I'm doing anything wrong apologies in advance.
I've been working on an Angular project and have a docker image containing it and its API (django) all one container. This all works well when I'm running locally. The angular code builds via webpack and looks at the local IP for the API. e.g. localhost:8000 but when I deploy to EC2 I get a magically auto assigned IP and need my angular app on boot up to use it. How do people do this normally? Service or API endpoint discovery seems like a core thing in a deployment like this but I think I'm going to have to do write a file into my angular 2 dist folder for NGINX to use by doing something with the AWS EC2 endpoint documented here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#working-with-ip-addresses I would do a CURL or something similar on this URL and put it into a file and then create some kind of service on my app to use this file or a sensible default for my endpoint. Is this a good way to do it or do people have a better way? Thanks in advance MB -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
