公开Docker的URL构成

我刚刚开始使用docker和docker-compose,并且遇到了一些理解如何公开服务的麻烦。

我正在阅读本教程,在我看来,他们使用端口公开来分派请求到服务。 这是docker-compose.yaml文件的一部分

vote: image: dockersamples/examplevotingapp_vote:before ports: - 5000:80 result: image: dockersamples/examplevotingapp_result:before ports: - 5001:80 

因此,他们分别通过localhost:5000 localhost:5001访问投票和结果服务。 我想知道,是否有可能将这些服务映射到URL,所以我可以访问他们像localhost/votelocalhost/result