openverse-api
openverse-api copied to clipboard
`just` command to list services and their ports
Problem
It can be a bit difficult to grok which services the API just up command starts and what ports they are on.
Description
Add a new just command which lists running services and their ports. Perhaps something like this output:
openverse-api
❯ just list-services
4 Services are running:
- Service name: http://localhost/:{port}
- Service name: http://localhost/:{port}
- Service name: http://localhost/:{port}
- Service name: http://localhost/:{port}
We could run this automatically after just up as well to make it really clear to users.
As far as implementing this goes, we'll want to make sure to list the services programmatically and not via hardcoded strings so it's resilient to port changes or errors. For example perhaps we could parse docker ps and prettify the output, or some other approach.
Alternatives
Additional context
Implementation
- [ ] 🙋 I would be interested in implementing this feature.
It should be easy enough to run docker-compose config and then do some light parsing of it in order to get this output!
Triaging as medium as this would be highly useful but is non-blocking.