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


Development standards


  • App Dev

    Hi all,

    I am just embarking on Cloudron packaging. I was just wondering is there any standards where certain files should live. I have seen some repos use /app/pkg folder but I was wondering if there is something written down?

    Thanks


  • App Dev

    @ultraviolet most apps put source code, binaries, etc in /app/code/*. I'd use that for standard files that would not be modified by users. This folder is locked as read-only once the app is running. Also Note**: most of the filesystem in an app is read-only. This means that only a couple folders are writable once the app is packaged. This needs to be taken into account when building an app.

    /app/data/ is as it sounds, the apps data can be here (if it is not in a DB for example). Stuff like user uploads, themes, and other user-changable files/objects can go here. This folder is one of a few read-writeable folders by users when an app is running.

    /tmp is writeable as well, and is used for temp file storage.


  • Staff

    @ultraviolet I think your vault package is looking pretty great already. Most of the conventions are not written down (and we are also not too picky about things) as long as the code is correct. You can pick up many of the styles from the repos with the -app suffix at https://git.cloudron.io/cloudron . I will try to make some notes from your vault package.


  • App Dev

    @girish thank you 🙂 I have also packaged calibre-web and I am working on Mayan EDMS just now. If people get use out of it I am happy to share the repo too.


Log in to reply