Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Cloudron CLI within an app?

    Support
    cli
    4
    7
    285
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mmolivier
      mmolivier last edited by girish

      Hi,
      While reading the docs for creating a Custom App I ran into the following warning:

      The Cloudron CLI is intended to be installed on your PC/Mac and should NOT be installed on the Cloudron.

      Some background regarding the problem I'm trying to solve: I want to create a Custom App based on the Docker image of coder.com. Within this environment I'll be developing applications. After each git push the idea is to do a docker build and docker push. At this point git and the Docker Registry are up to date.

      The next step would be to 'push' these changes to Cloudron. To do this I have to execute cloudron push or cloudron update. Would this work considering that I'm working within a Cloudron app? Or would it be more recommended to do this step on a higher level or a different environment?

      Does this flow make sense? Apologies if this is a dumb question 🙂

      BrutalBirdie 1 Reply Last reply Reply Quote 0
      • BrutalBirdie
        BrutalBirdie Staff @mmolivier last edited by BrutalBirdie

        @mmolivier

        Example from me wanting to update my custom forked minecraft app (1.3.9 to 1.4.0) after I merged the recent updates from the original

        # build my image
        ╭─eha-desktop in ⌁
        ╰─λ docker build -t brutalbirdie/minecraft-app:1.4.0 .
        
        # Push my image
        ╭─eha at eha-desktop in ⌁
        ╰─λ docker push brutalbirdie/minecraft-app:1.4.0
        
        # Update my installed App and do not run a backup
        ╭─eha at eha-desktop in ⌁
        ╰─λ cloudron update --no-backup --image brutalbirdie/minecraft-app:1.4.0 --app mc.domain.tld
        

        Note that docker push uses your configured registry, in my case it was hub.docker.com
        You also need to configure your docker registry in cloudron.

        33c89a18-6924-4e91-80c6-e3f6b9e6e50f-image.png

        Like my work? Consider donating a beer 🍻 Cheers!

        mmolivier 1 Reply Last reply Reply Quote 0
        • mmolivier
          mmolivier @BrutalBirdie last edited by

          @brutalbirdie right, but you're running these commands from your local desktop right? In my case the "local desktop" would be an installed app. In theory the Cloudron CLI tool should work, but the warning in the docs made me doubt.

          BrutalBirdie 1 Reply Last reply Reply Quote 0
          • BrutalBirdie
            BrutalBirdie Staff @mmolivier last edited by

            Yea I just re-read your issue. (and you commented what I just gathered)
            Since you are inside the cloudron app you need to install the cloudron-cli inside the app.

            aka. while building the container.

            Like my work? Consider donating a beer 🍻 Cheers!

            1 Reply Last reply Reply Quote 1
            • nebulon
              nebulon Staff last edited by nebulon

              Using cloudron-cli within an app as such is no issue. However I wonder what your use-case for such an app is. It looks like you have git and such tools on your laptop/desktop already, so maybe the Cloudron build service app is what could help you as well, if your concern is building docker images on your laptop and pushing them to the docker hub or other registries: https://www.cloudron.io/store/io.cloudron.buildservice.html or the docs have more info https://docs.cloudron.io/apps/build-service/

              In fact we mostly built that to speed up docker pushes (for example when working out of a cafe wifi 😉 ) and avoiding the need to have a properly working docker environment locally.

              mmolivier 1 Reply Last reply Reply Quote 0
              • mmolivier
                mmolivier @nebulon last edited by

                Hi @nebulon, the usecase is that I want my dev environment on a remote VPS so I don't need to worry about backups or my laptop breaking all of a sudden. I need to be able to switch to another laptop with minimal effort.

                Up until now I've got this working pretty well on a VPS but keeping it up to date and managing configurations is a pain. Cloudron seems to solve that.

                Even though the CLI is very intuitive, the build service seems interesting, I'll look into that, thanks!

                1 Reply Last reply Reply Quote 0
                • robi
                  robi last edited by

                  This sounds like it should be a part of the build package and/or the registry package, depending on use case.

                  Life of Advanced Technology

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB