Is it possible to map hosts instead of ports in docker-compose?

Viewed 22

I use docker-compose.yml and docker-compose up -d to develop react apps.

However, since I'm developing many modules and apps, ports get really really confusing.

It's an old computer rule that:

numbers are for computers, texts are for humans

I wonder if it's possible to bind host to docker-compose instead of ports?

For example I would rather go to app.local instead of localhost:3000.

This way I can easily navigate between apps as I would remember their names very easily:

app.local module.local admin.app.local investor.app.local ...

0 Answers
Related