Commit fe4678f
authored
Add services pcport command (#2784)
Closes #2783
## Summary
This command returns the port that process-compose is running on. That
makes it more feasible to use the process-compose api in scripting.
For example:
```
pcport=$(devbox services pcport)
curl http://localhost:$pcport/process/good-server | jq ".status, .is_ready"
```
## How was it tested?
With process-compose running:
```
$ dist/devbox services pcport
53173
$ echo $?
0
```
With process-compose stopped:
```
$ dist/devbox services pcport
Error: process-compose is not running or it's config is missing. To start it, run `devbox services up`
source: failed to find projectDir /Users/elliott.hilaire/github.com/elliotthilaire-ca/devbox in config.Instances
$ echo $?
1
```
## Community Contribution License
All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).
By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).
## AI disclosure
Claude code assisted in creating this PR.1 parent f0571c5 commit fe4678f
2 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
| |||
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
| 153 | + | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
| |||
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
0 commit comments