Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automation using CLI #15

Closed
gingerlime opened this issue Mar 17, 2019 · 5 comments

Comments

@gingerlime
Copy link

commented Mar 17, 2019

Please forgive me if I'm missing something obvious, but I'm a bit confused about the documentation.

I'm trying to essentially automate the creation of my CapRover apps using the CLI.

So, I'm basically trying to see if I can install one-click-apps or specific docker images to CapRover using only the CLI. This includes things like the environment variables that go into the App Config on the web console, the custom URLs that those apps might have, etc.

Is it possible? How do I pass those environment variables when I deploy a new app? Or a custom HTTP domain, custom volume locations etc?

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

commented Mar 17, 2019

I'm trying to essentially automate the creation of my CapRover apps using the CLI.

Not supported yet. It will be supported soon via the solution discussed here:
#12 (comment)

So, I'm basically trying to see if I can install one-click-apps or specific docker images to CapRover using only the CLI. This includes things like the environment variables that go into the App Config on the web console, the custom URLs that those apps might have, etc.

One-click apps are a different problem. They are built on the frontend (website code). The steps are:

  • Fetching the template from https://github.com/caprover/one-click-apps
  • Asking user to enter variables and replacing them in the template JSON file
  • For each container, follow these steps: Create, configure, deploy image.

CLI doesn't have support of one-click apps. Having said that, once we have the API raw command support in CLI, it won't be hard to built your own one-click app automation using CLI. I didn't think it's a common use case for one-click apps to have CLI support. May I ask what your use case is?

@gingerlime

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

May I ask what your use case is?

I was using one-click-apps just as an example. I don't actually need them for automation.

But if, let's say for example: I need to setup a Postgresql database (with its own user/password), redis, a web app that connects to the database (need to pass the database connection, user, password etc), and some background workers that also connect to the database, and redis, etc. I want to also configure the web app to respond on a custom domain www.xyz.com etc

So can this be automated via the CLI or some other ways? so far the closest I can get to it is to do this manually, and then download a backup tar and use it. It's actually not a bad solution, but I was wondering if automation via the CLI is a bit more flexible (I can programmatically set things like passwords, names etc).

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

commented Mar 17, 2019

So can this be automated via the CLI or some other ways? so far the closest I can get to it is to do this manually, and then download a backup tar and use it. It's actually not a bad solution, but I was wondering if automation via the CLI is a bit more flexible (I can programmatically set things like passwords, names etc).

Not possible yet, but it'll be with this: #12 (comment)

@gingerlime

This comment has been minimized.

Copy link
Author

commented Mar 17, 2019

That sounds good. The main question then is how stable the API is, or how likely endpoints are to change (otherwise, my automation always needs to play catch-up with whatever the state of the API is)

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

commented Mar 17, 2019

It's fairly stable. The only major change was in v1.0, over 1 year after the original release. And even that was mostly some path changes, e.g., we changed /app/update, user/app/update or something similar...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.