You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Apologies if this is already something that's possible, but I'm assessing solutions to a CI pipeline I'm trying to setup which involves deploying a pull request for testing and CapRover looks perfect for what we want to do. I couldn't find a way however of removing an app from the CLI?
I'd like a way of dynamically adding/removing apps from the CLI so it can be automated by the CI. This would allow me to have a new app deployed when a pull request is opened (which seems possible already), but more specifically to be able to remove that app when the PR is merged/closed. The documentation doesn't make any mentione of removing apps.
If this is already possible then great but I haven't seen anything
CLI doesn't have support for this. The reason is that CapRover has a relatively large API, not all API methods are implemented in CLI. It'll be a maintenance nightmare to have a CLI command for each API endpoint. We kept the CLI commands limited to most common ones.
Having said that, since CapRover has an open rest API, it is completely possible to brew your custom bash script using CURL. Having said that, I think we can implement a super generic CLI command to take endpoint path, params and etc, to remove dependency on CURL. Something like:
That would be perfect! Completely understand not implementing every function in the CLI, that would be a nightmare. Is there anything documented around the API that's currently available? I didn't see anything but may have overlooked it. I'd be happy to help on this if we end up using caprover as our solution though I can't give an ETA on when that might be - it's sadly not a top priority :(
Activity
githubsaturn commentedon Mar 11, 2019
CLI doesn't have support for this. The reason is that CapRover has a relatively large API, not all API methods are implemented in CLI. It'll be a maintenance nightmare to have a CLI command for each API endpoint. We kept the CLI commands limited to most common ones.
Having said that, since CapRover has an open rest API, it is completely possible to brew your custom bash script using CURL. Having said that, I think we can implement a super generic CLI command to take endpoint path, params and etc, to remove dependency on CURL. Something like:
where pathToJson is a file containing:
This way we cover "all" endpoints and there is no dependency on CURL, and no maintenance nightmare.
pareeohnos commentedon Mar 11, 2019
That would be perfect! Completely understand not implementing every function in the CLI, that would be a nightmare. Is there anything documented around the API that's currently available? I didn't see anything but may have overlooked it. I'd be happy to help on this if we end up using caprover as our solution though I can't give an ETA on when that might be - it's sadly not a top priority :(
githubsaturn commentedon Mar 11, 2019
No "official" documentation of endpoints ATM. But there is some sort of a pseudo documentation in the frontend code. It's pretty easy to understand:
https://github.com/caprover/caprover-frontend/blob/master/src/api/ApiManager.ts
pareeohnos commentedon Mar 12, 2019
Ah great thanks, I'll take a look :)
githubsaturn commentedon Aug 16, 2019
Thanks to @Hazzard17h
The generic API is now implemented! Give it a shot!
pareeohnos commentedon Aug 19, 2019
ah amazing, thanks for the update :)