Nginx can't find upstream host in multi-container docker compose setup
You should check names of your services. Docker compose will start your service api in pod named [YOUR_PROJECT_NAME]_api_1. Start only api and client and check output of docker ps
. You should gey list of names of pods.
In newer docker_compose syntax versions you can use link_external to map [YOUR_PROJECT_NAME]_api_1 to api.