-
Notifications
You must be signed in to change notification settings - Fork 299
Description
What problem are you trying to solve?
I'm building automation and scripts around testing using devbox and also testing devbox configurations themselves.
I'd like to be able include in my scripts specific check on individual processes to check on their status.
Process compose already exposes an API. If there was an easy way to fetch the port that process-compose is running I can fetch
What solution would you like?
A devbox services pcport that returns the port number process-compose is running on. Then I can use this to make requests to the process-compose api.
If process-compose is not running then it should exit with a non zero code and print a message to say process-compose is not running.
For example I'd like write a script that includes something like:
devbox services start
...
pcport=$(devbox services pcport)
curl http://localhost:$pcport/process/good-server | jq ".status, .is_ready"
...
Exposing the port in this way would allow advances usage via the process-compose API without needing to add extra subcommands to devbox services
Alternatives you've considered
devbox services ls provides a limited set of fields. I've looked into scripting using that output.
I've also looked into parsing the port number out of the output of devbox services start but my scripts won't always be able to pull the value at that point in time.
Both of these ideas are brittle.