- Newest
- Most votes
- Most comments
Sounds like maybe this might help? https://dev.to/devasservice/the-cheap-way-how-to-use-docker-to-deploy-your-fastapi-kmn Specifically this part:
upstream app server, contains the definition of our API endpoint, as you can see if references the url ‘api:8080’ (api is our other docker instance name from the docker-compose file, this allows cross communication between instances)
You could try changing server 172.17.0.2:5000;
to server api:5000;
or whatever that container is called.
I was using
docker
instead ofapi
before and that should have worked too. I think the important part from the link you shared is adding a line to copy thenginx.conf
file within theDockerfile
. I'll try that for the next "release".Glad to hear...please let me know if that fixes it.
So, for now I have given up on setting a specific configuration for nginx
inside the instance. Instead, I changed the uvicorn
command to run the server listening on port 80
. That gets picked up by the default nginx
config of AWS and now my app is open to the world!
Relevant content
- asked 2 years ago
- Accepted Answerasked 9 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated a year ago
Are you using the Docker platform branch or ECS platform branch?
Hi John, I'm using the Docker platform branch.