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


Skip to content

App Packaging & Development

App package development & help

225 Topics 2.2k Posts

Subcategories


  • Looking to collaborate? Post here if you need help or willing to offer help.

    31 Topics
    249 Posts
    fbartelsF

    Just doing a local build of your repo (outside of Cloudron) and modifying your start.sh so that output is done to the container, it reports as running on port 8000 (on localhost, but also globally). /healtcheck does not seem to exist (gives a 404), but / gives a 200 for me. On the browser however it just loads endlessly.

    Looking at the devtools on Chrome it tries to load a service worker (worker.js) which only gives a 404, but would anyways need https to function properly.

  • 0 Votes
    5 Posts
    244 Views
    LonkleL

    @mehdi said in Is there a way to make LDAP mandatory on the Cloudron App Store?:

    @Lonk I'm not sure I understand the question.

    As long as your app has the LDAP addon, you're good. You just have to not include the optionalSSO entry in manifest https://docs.cloudron.io/custom-apps/manifest/#optionalsso

    You answered correctly! Thanks.

  • 0 Votes
    8 Posts
    309 Views
    LonkleL

    @girish said in Why wouldn't cloudron install take into account the private registry:

    Ah, this is because in the code we assume that if the registry is not set in the image name, it is a public image from the docker.io registry - https://git.cloudron.io/cloudron/box/-/blob/master/src/docker.js#L112 . Currently, the Cloudron App Store images do not use have the registry name in them (since images are public). If you passed in 'lonk/xxx', code doesn't know if it pass auth info or not. I guess we could "hardcode", the username in the check as well but we also have cloudron, cloudron-dev, cloudron-staging and some other usernames in docker hub.

    The fix is easy though: cloudron build --set-repository and then enter docker.io/lonk/xyz (i.e include the docker.io part).

    Though this solution worked perfectly for me, it was not intuitive. And you did bring up an interesting point. I have two accounts on Docker Hub myself (one for production, one for staging). Could Cloudron support multiple users in the Cloudron Private Registry page? In case some of the projects end up being private?

    As for determining if and when to use credentials to pick up a private Docker registry based on the name of the username / base and if the script can find a public registry with that info, if not fall back to authenticated.

    I think that wouldn't be a hard edit for your Build Service, let me see if I can make it as a proof of concept.

  • 1 Votes
    3 Posts
    179 Views
    d19dotcaD

    @fbartels Okay I'll try that then, thanks man.

    Disappointed that GitLab doesn't seem to have a way to do that as other Git servers do, but oh well.

    I'll try with the CLI part then. Thanks again. 🙂

  • Finishing the VPN Client app's functionality

    5
    0 Votes
    5 Posts
    134 Views
    LonkleL

    @girish said in Finishing the VPN Client app's functionality:

    Since, async functions can get some time to get used to, what you can do as a "hack" for now is to just set a property in appdb. For example, add a line https://git.cloudron.io/cloudron/box/-/blob/master/src/appdb.js#L59 like result.networkId = container:vpncontainerappid. Then you have this properly available in the docker.js code.

    I think the final code will anyway read the networkId from the app table, so your code won't require much change if you do something like above.

    That’s perfect. I hated how hacky my solution was so I’m going to to recode it in the way you described. Doing it the way you described also allows me to add a comma-delimited list of all VPN containers thus supporting more than one VPN client running simultaneously on Cloudron (my hacky code only allows for a single OpenVPN client).

    I need to add the container name to the DB and the internal IP of the running vpn client container. Both are essential.

    Then when any user chooses to connect to the VPN then that specific app will restart and be configured to route all outgoing traffic to it.

    The only caveat in all of this is that though technically an unlimited amount of web apps can connect to the vpn client, a limitation is that the web apps can’t share the same exposed port as any of the others. This is gotten around in Docker by binding randomized ports to the exposed port. But when you connect to a VPN Client, you have to be running on the same IP so you lose the ability to Docker “bind.”

    There may be a way around this using Docker Connect -link argument. But I think the same caveat would apply and that would only solve the problem of having the app not have to do a quick restart to connect. But I’ll make sure. ☺️

  • App Dev label on user profile on these forums.

    5
    4 Votes
    5 Posts
    260 Views
    marcusquinnM

    @Lonk community karma 🙌

  • Wanted to give a public shoutout to FBartels

    Moved
    10
    12 Votes
    10 Posts
    452 Views
    LonkleL

    @jdaviescoates I’m an idiot, you’re absolutely right: https://forum.cloudron.io/topic/2686/live-stream-on-creating-an-app-for-cloudron?_=1602281676588

    This is the clip that made me a Cloudron developer enthusiast. I think it could help anyone / everyone starting out.

    Also, if anyone has any questions let me know. I had to take the week off work due to a hugely personal situation. But I’ll be back on Monday full steam on the forum and would love to help any new developers (in the same way @fbartels helped me, indirectly). I don’t know as much about box as @girish but if someone is making an app that needs deeper level dockerode / Docker / node knowledge - let me know. It took me 4 days to understand how node asynchronicity worked. So if I can help someone turn that into one day. I can tell you how do to so.

    Note: Cloudron box uses callback Node methodology so when researching it, make sure to look into that type of methodology when it comes to handling asynchronousity since this project was started in the timeframe callbacks were the most popular.

  • 0 Votes
    6 Posts
    405 Views
    girishG

    @msbt I faced a similar issue with node-red. While I haven't tried it yet, I think what we want is to set NODE_PATH. See https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders . I guess we set NODE_PATH=/app/data/custom-modules or something ?

  • Need help using cloudron's gitlab

    6
    0 Votes
    6 Posts
    195 Views
    girishG

    Looks like importing is some admin specific functionality. Oh, well.

  • How updates work?

    13
    1 Votes
    13 Posts
    561 Views
    LonkleL

    @d19dotca I definitely see a case for making it optional especially because then it helps those of us who want to build our apps for the Cloudron App Store to test updates out and have them deploy exactly the same as official App Store apps.

  • 1 Votes
    3 Posts
    232 Views
    R

    Great, this works well.

  • Terminal reconnect after few seconds

    Solved
    5
    1 Votes
    5 Posts
    253 Views
    R

    Good morning,

    I found the problem. It was a supervisor misconfiguration. I copied a wrong template with a logging path that was unreachable.

    Thanks

  • 0 Votes
    14 Posts
    718 Views
    nebulonN

    Glad it solved itself 🙂

  • 0 Votes
    17 Posts
    911 Views
    girishG

    @JOduMonT Yup, we are waiting for the next peertube release to make it stable (there is a bug in current release which makes it hard to finish the setup) and then start posting videos there.

  • Manifest recvmail

    Moved
    5
    0 Votes
    5 Posts
    324 Views
    ultravioletU

    thanks @girish makes sense!