NGINX and Docker-Compose: host not found in upstream
The nginx
webserver is on the network app-network
which is a different network than the other two services which don't have a network defined. When no network is defined docker-compose will create a default network for them to share.
Either copy the network setting to both of the other services or remove the network setting from the webserver service.