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. Using AI to build a package

Using AI to build a package

Scheduled Pinned Locked Moved App Packaging & Development
5 Posts 3 Posters 445 Views 4 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.
  • E Offline
    E Offline
    eddowding
    wrote on last edited by
    #1

    As an experiment, I just used Claude to see if I could package an app. However, I have no idea if it's correct or not. Could someone please let me know how close this is?

    https://github.com/getfider/fider/tree/v0.22.0

    Claude:

    I'll help you package Fider for Cloudron. Let me create the necessary configuration files for packaging Fider v0.22.0.Cloudron Package Configuration for Fider.

    To package this for Cloudron:

    1. Create a new directory and place these files in it:
    mkdir fider-cloudron
    cd fider-cloudron
    # Place the files from the artifact here // code below & https://claude.site/artifacts/c9929cf9-5697-47e6-8fc4-b5ac74777e1b
    
    1. Download the Fider logo:
    wget https://raw.githubusercontent.com/getfider/fider/v0.22.0/public/images/logo-100x100.png -O logo.png
    
    1. Build and package:
    cloudron build
    cloudron install
    

    This configuration:

    • Uses PostgreSQL for the database
    • Configures SMTP for email sending
    • Maintains persistent storage for uploads
    • Handles automatic backups
    • Provides health checking
    • Sets up proper environment variables

    https://claude.site/artifacts/c9929cf9-5697-47e6-8fc4-b5ac74777e1b

    // CloudronManifest.json
    {
      "id": "org.fider.cloudron",
      "title": "Fider",
      "author": "Fider Team",
      "description": "Open source feedback and feature request collector",
      "tagline": "Get feedback from your customers",
      "version": "0.22.0",
      "healthCheckPath": "/health",
      "httpPort": 3000,
      "addons": {
        "postgresql": {},
        "sendmail": {}
      },
      "manifestVersion": 2,
      "website": "https://fider.io",
      "contactEmail": "support@cloudron.io",
      "icon": "logo.png",
      "tags": ["feedback", "uservoice", "feature-requests"],
      "mediaLinks": [
        "https://raw.githubusercontent.com/getfider/fider/v0.22.0/docs/screenshots/1.png",
        "https://raw.githubusercontent.com/getfider/fider/v0.22.0/docs/screenshots/2.png"
      ],
      "minBoxVersion": "7.0.0",
      "forumUrl": "https://forum.cloudron.io/",
      "documentationUrl": "https://github.com/getfider/fider/tree/v0.22.0/docs",
      "postInstallMessage": "Fider has been successfully installed! Visit the app to complete initial setup."
    }
    
    // Dockerfile
    FROM getfider/fider:0.22.0
    
    # Add Cloudron-specific configurations
    ENV NODE_ENV=production
    ENV HOST_MODE=false
    ENV SSL_CERT=false
    ENV PORT=3000
    
    # Cloudron will provide these through environment variables
    ENV POSTGRES_URL=postgresql://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DATABASE}
    ENV EMAIL_SMTP_HOST=${SMTP_SERVER}
    ENV EMAIL_SMTP_PORT=${SMTP_PORT}
    ENV EMAIL_SMTP_USERNAME=${SMTP_USERNAME}
    ENV EMAIL_SMTP_PASSWORD=${SMTP_PASSWORD}
    
    # Create data directory for uploads
    RUN mkdir -p /app/data
    VOLUME ["/app/data"]
    
    # Setup healthcheck
    HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 \
        CMD curl -f http://localhost:3000/health || exit 1
    
    EXPOSE 3000
    
    # start.sh
    #!/bin/bash
    set -e
    
    # Wait for PostgreSQL to be ready
    until nc -z -w5 ${POSTGRESQL_HOST} ${POSTGRESQL_PORT}; do
        echo "Waiting for PostgreSQL to be ready..."
        sleep 2
    done
    
    # Update database configuration
    export JWT_SECRET=${CLOUDRON_APP_TOKEN}
    export BASE_URL=${CLOUDRON_APP_ORIGIN}
    
    # Start Fider
    exec /app/fider
    
    // README.md
    # Fider for Cloudron
    
    This package allows you to run Fider on Cloudron. Fider is an open source feedback and feature request collector.
    
    ## Installation
    
    1. Install via the Cloudron App Store
    2. Access your Fider instance at the configured domain
    3. Complete the initial setup process
    
    ## Configuration
    
    The app automatically configures:
    - PostgreSQL database connection
    - SMTP email settings
    - Base URL and JWT settings
    
    ## Backup and Restore
    
    Cloudron automatically handles backup and restore of:
    - PostgreSQL database
    - Uploaded files in /app/data
    
    ## Updates
    
    Updates can be installed through the Cloudron App Store when new versions are available.
    
    ## Support
    
    For issues related to:
    - Fider: Visit https://github.com/getfider/fider/issues
    - This Cloudron package: Post on Cloudron forum
    
    1 Reply Last reply
    2
    • E eddowding referenced this topic on
    • E Offline
      E Offline
      eddowding
      wrote on last edited by
      #2

      This is one-shot in Claude. I imagine a trained AI might do better.

      1 Reply Last reply
      2
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #3

        Nice try, seems like a very long way to go though. Especially the Dockerfile. It has valid syntax mostly, that is a good start, but otherwise nearly no single line makes any sense in the Cloudron context to be honest. Pretty much the same can be said about the start.sh. Last time I tried though chatgpt did perform much better, it just really struggled with the CloudronManifest.json 😄

        1 Reply Last reply
        2
        • E Offline
          E Offline
          eddowding
          wrote on last edited by
          #4

          Have you tried training them on example files?

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

            Here is an example session of how to better "talk to" the AI so it understands what you're doing.
            https://skylarbpayne.com/posts/cursed-cursor

            Having it analyze a similar app and start with the manifest, then have a template process to follow will get it closer to what you want. It's all about clearer communication on your part.

            Conscious tech

            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