- 최신
- 최다 투표
- 가장 많은 댓글
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!
Are you using the Docker platform branch or ECS platform branch?
Hi John, I'm using the Docker platform branch.