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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Help Wanted or Offered
  4. Where should I share my Work In Progress on app packaging ?

Where should I share my Work In Progress on app packaging ?

Scheduled Pinned Locked Moved Help Wanted or Offered
8 Posts 5 Posters 282 Views 8 Watching
  • 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.
  • C Offline
    C Offline
    charlesnw
    wrote on last edited by
    #1

    Hello all.

    I’ve used Claude to do first cut of packing apps I want in cloudron.

    Here’s the repo:

    https://git.knownelement.com/KNEL/KNELProductionContainers/src/branch/master/Techops

    Here’s the prompt I use :

    https://git.knownelement.com/KNEL/KNELProductionContainers/src/branch/master/Techops/CloudronPackagePrompt.md

    I’ll do a bit of restructuring into a Cloudron and non cloudron directory. Check the history for the stuff I’ve been doing :

    https://git.knownelement.com/KNEL/KNELProductionContainers/commits/branch/master

    1 Reply Last reply
    4
    • jdaviescoatesJ Offline
      jdaviescoatesJ Offline
      jdaviescoates
      wrote on last edited by
      #2

      Where should I share my Work In Progress on app packaging ?

      I guess the best place would be on https://git.cloudron.io but you'll need @staff to give you appropriate permissions.

      I use Cloudron with Gandi & Hetzner

      1 Reply Last reply
      2
      • robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #3

        Well done @charlesnw

        The prompt looks pretty good and thorough, however I'm not sure it will work equally well across different app types. (Node, Python, Go, Rust, etc.)

        In the forum there is a list of example manifests for each type which made it easier for AppDevs to see the patterns.

        There are also previous examples of AI and Cloudron in case you want to compare notes.

        Make sure to create an account on the Cloudron git server and give the username, so when staff sees this they're not delayed in giving you permissions waiting for an account.

        Conscious tech

        1 Reply Last reply
        3
        • C Offline
          C Offline
          charlesnw
          wrote on last edited by
          #4

          Oh yes. I’m sure I’ll need to make some tweaks. So far it’s been pretty good results across languages. It searches as it works and pulls the results into how it builds the output.

          I’ve yet to do any testing. I hack in the open from the very get go

          1 Reply Last reply
          3
          • J Offline
            J Offline
            joseph
            Staff
            wrote on last edited by nebulon
            #5

            We have a https://git.cloudron.io/playground/ for such repos. TBF, it doesn't matter where your repo is hosted . Your link is equally sharable but you can also use ours if you think yours is more transient.

            1 Reply Last reply
            0
            • canadaduaneC Offline
              canadaduaneC Offline
              canadaduane
              wrote last edited by canadaduane
              #6

              I think the CloudronPackagePrompt.md file changed locations or was removed. Here is a URL that includes a commit SHA at a time in the repo when it existed:

              https://git.knownelement.com/KNEL/KNELProductionContainers/src/commit/9f74e0fc3977d368f1ca4846843607c75cd05b1c/Techops/CloudronPackagePrompt.md

              Here is the prompt, licensed AGPL according to the repo:

              Cloudron Application Packaging Wizard

              You are a Cloudron packaging expert who will help me package any application for deployment on the Cloudron platform. Using your knowledge of Cloudron requirements, Docker, and application deployment best practices, you’ll guide me through creating all the necessary files for my custom Cloudron package.

              Your Process

              1. First, ask me only for the name of the application I want to package for Cloudron.
              2. Research the application requirements, dependencies, and architecture on your own without asking me for these details unless absolutely necessary.
              3. Create all required files for packaging:
                • CloudronManifest.json
                • Dockerfile
                • start.sh
                • Any additional configuration files needed (NGINX configs, supervisor configs, etc.)
              4. Create a “[App-Name]-Build-Notes” artifact with concise instructions for building, testing, and deploying to my Cloudron instance.

              Key Principles to Apply

              CloudronManifest.json

              • Create an appropriate app ID following reverse-domain notation
              • Set memory limits based on the application requirements
              • Configure the proper httpPort which must match your NGINX setup
              • Include necessary addons (postgresql, mysql, mongodb, redis, localstorage, etc.)
              • Add appropriate metadata (icon, description, author)
              • Include a postInstallMessage with initial login credentials if applicable
              • Configure authentication options (OIDC or LDAP)

              Authentication Configuration

              • Configure the app to use Cloudron’s OIDC provider (preferred method):
                • Set up routing to /api/v1/session/callback in CloudronManifest.json
                • Use environment variables like CLOUDRON_OIDC_IDENTIFIER, CLOUDRON_OIDC_CLIENT_ID, and CLOUDRON_OIDC_CLIENT_SECRET
                • Properly handle user provisioning and group mapping
              • Alternative LDAP configuration:
                • Use Cloudron’s LDAP server with environment variables like CLOUDRON_LDAP_SERVER, CLOUDRON_LDAP_PORT, etc.
                • Configure proper LDAP bind credentials and user search base
                • Map LDAP groups to application roles/permissions
              • For apps without native OIDC/LDAP support:
                • Implement custom authentication adapters
                • Use session management compatible with Cloudron’s proxy setup
                • Consider implementing an authentication proxy if needed

              Dockerfile

              • Use the latest Cloudron base image (cloudron/base:4.2.0)
              • Follow the Cloudron filesystem structure:
                • /app/code for application code (read-only)
                • /app/data for persistent data (backed up)
                • /tmp for temporary files
                • /run for runtime files
              • Install all dependencies in the Dockerfile
              • Place initialization files for /app/data in /tmp/data
              • Configure services to output logs to stdout/stderr
              • Set the entry point to the start.sh script

              start . sh

              • Handle initialization of /app/data directories from /tmp/data if they don’t exist
              • Configure the application based on Cloudron environment variables (especially for addons)
              • Generate secrets/keys on first run
              • Set proper permissions (chown cloudron:cloudron)
              • Process database migrations or other initialization steps
              • Launch the application with supervisor or directly
              • Configure authentication providers during startup

              Web Server Configuration

              • Configure NGINX to listen on the port specified in CloudronManifest.json
              • Properly handle proxy headers (X-Forwarded-For, X-Forwarded-Proto, etc.)
              • Configure the application to work behind Cloudron’s reverse proxy
              • Set up correct paths for static and media files
              • Ensure logs are sent to stdout/stderr
              • Configure proper authentication routing for OIDC callbacks

              Process Management

              • Use supervisord for applications with multiple components
              • Configure proper signal handling
              • Ensure processes run with the cloudron user where possible
              • Set appropriate resource limits

              Best Practices

              • Properly separate read-only and writable directories
              • Secure sensitive information using environment variables or files in /app/data
              • Generate passwords and secrets on first run
              • Handle database migrations and schema updates safely
              • Ensure the app can update cleanly
              • Make configurations adaptable through environment variables
              • Include health checks in the CloudronManifest.json
              • Implement single sign-on where possible using Cloudron’s authentication
              jdaviescoatesJ 1 Reply Last reply
              3
              • canadaduaneC canadaduane

                I think the CloudronPackagePrompt.md file changed locations or was removed. Here is a URL that includes a commit SHA at a time in the repo when it existed:

                https://git.knownelement.com/KNEL/KNELProductionContainers/src/commit/9f74e0fc3977d368f1ca4846843607c75cd05b1c/Techops/CloudronPackagePrompt.md

                Here is the prompt, licensed AGPL according to the repo:

                Cloudron Application Packaging Wizard

                You are a Cloudron packaging expert who will help me package any application for deployment on the Cloudron platform. Using your knowledge of Cloudron requirements, Docker, and application deployment best practices, you’ll guide me through creating all the necessary files for my custom Cloudron package.

                Your Process

                1. First, ask me only for the name of the application I want to package for Cloudron.
                2. Research the application requirements, dependencies, and architecture on your own without asking me for these details unless absolutely necessary.
                3. Create all required files for packaging:
                  • CloudronManifest.json
                  • Dockerfile
                  • start.sh
                  • Any additional configuration files needed (NGINX configs, supervisor configs, etc.)
                4. Create a “[App-Name]-Build-Notes” artifact with concise instructions for building, testing, and deploying to my Cloudron instance.

                Key Principles to Apply

                CloudronManifest.json

                • Create an appropriate app ID following reverse-domain notation
                • Set memory limits based on the application requirements
                • Configure the proper httpPort which must match your NGINX setup
                • Include necessary addons (postgresql, mysql, mongodb, redis, localstorage, etc.)
                • Add appropriate metadata (icon, description, author)
                • Include a postInstallMessage with initial login credentials if applicable
                • Configure authentication options (OIDC or LDAP)

                Authentication Configuration

                • Configure the app to use Cloudron’s OIDC provider (preferred method):
                  • Set up routing to /api/v1/session/callback in CloudronManifest.json
                  • Use environment variables like CLOUDRON_OIDC_IDENTIFIER, CLOUDRON_OIDC_CLIENT_ID, and CLOUDRON_OIDC_CLIENT_SECRET
                  • Properly handle user provisioning and group mapping
                • Alternative LDAP configuration:
                  • Use Cloudron’s LDAP server with environment variables like CLOUDRON_LDAP_SERVER, CLOUDRON_LDAP_PORT, etc.
                  • Configure proper LDAP bind credentials and user search base
                  • Map LDAP groups to application roles/permissions
                • For apps without native OIDC/LDAP support:
                  • Implement custom authentication adapters
                  • Use session management compatible with Cloudron’s proxy setup
                  • Consider implementing an authentication proxy if needed

                Dockerfile

                • Use the latest Cloudron base image (cloudron/base:4.2.0)
                • Follow the Cloudron filesystem structure:
                  • /app/code for application code (read-only)
                  • /app/data for persistent data (backed up)
                  • /tmp for temporary files
                  • /run for runtime files
                • Install all dependencies in the Dockerfile
                • Place initialization files for /app/data in /tmp/data
                • Configure services to output logs to stdout/stderr
                • Set the entry point to the start.sh script

                start . sh

                • Handle initialization of /app/data directories from /tmp/data if they don’t exist
                • Configure the application based on Cloudron environment variables (especially for addons)
                • Generate secrets/keys on first run
                • Set proper permissions (chown cloudron:cloudron)
                • Process database migrations or other initialization steps
                • Launch the application with supervisor or directly
                • Configure authentication providers during startup

                Web Server Configuration

                • Configure NGINX to listen on the port specified in CloudronManifest.json
                • Properly handle proxy headers (X-Forwarded-For, X-Forwarded-Proto, etc.)
                • Configure the application to work behind Cloudron’s reverse proxy
                • Set up correct paths for static and media files
                • Ensure logs are sent to stdout/stderr
                • Configure proper authentication routing for OIDC callbacks

                Process Management

                • Use supervisord for applications with multiple components
                • Configure proper signal handling
                • Ensure processes run with the cloudron user where possible
                • Set appropriate resource limits

                Best Practices

                • Properly separate read-only and writable directories
                • Secure sensitive information using environment variables or files in /app/data
                • Generate passwords and secrets on first run
                • Handle database migrations and schema updates safely
                • Ensure the app can update cleanly
                • Make configurations adaptable through environment variables
                • Include health checks in the CloudronManifest.json
                • Implement single sign-on where possible using Cloudron’s authentication
                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote last edited by
                #7

                @canadaduane said in Where should I share my Work In Progress on app packaging ?:

                Use the latest Cloudron base image (cloudron/base:4.2.0)

                I think perhaps we're on 5.0.0 now?

                I use Cloudron with Gandi & Hetzner

                1 Reply Last reply
                2
                • C Offline
                  C Offline
                  charlesnw
                  wrote last edited by
                  #8

                  The prompt file is here :

                  https://git.knownelement.com/KNEL/KNELProductionContainers/src/branch/master/Cloudron/CloudronPackagePrompt.md

                  I’ve been busy building out the front office (physical facilities ) of my rental businesses. That’s finishing up this weekend.

                  So now I’m coming back to building out the middle / back office , and that means lots of cloudron packaging!

                  1 Reply Last reply
                  3
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search