openverse-api icon indicating copy to clipboard operation
openverse-api copied to clipboard

`just` command to list services and their ports

Open zackkrida opened this issue 3 years ago • 2 comments

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.

zackkrida avatar Sep 26 '22 20:09 zackkrida

It should be easy enough to run docker-compose config and then do some light parsing of it in order to get this output!

AetherUnbound avatar Sep 26 '22 20:09 AetherUnbound

Triaging as medium as this would be highly useful but is non-blocking.

stacimc avatar Sep 27 '22 21:09 stacimc