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

    Development standards

    Discuss
    3
    4
    199
    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.
    • ultraviolet
      ultraviolet App Dev last edited by

      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

      murgero 1 Reply Last reply Reply Quote 1
      • murgero
        murgero App Dev @ultraviolet last edited by murgero

        @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.

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~
        Matrix: @murgero:urgero.org

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

          @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.

          ultraviolet 1 Reply Last reply Reply Quote 1
          • ultraviolet
            ultraviolet App Dev @girish last edited by

            @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.

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