#!/bin/bash # Manifest Update Script for Cloudron Packages # Updates manifests with correct ports, health checks, and metadata for each application type set -e WORKSPACE="/home/localuser/TSYSDevStack/Cloudron/CloudronPackages-Workspace" # Application port and health check mapping declare -A APP_PORTS=( # Go Applications (typically 8080) ["goalert"]="8080" ["webhook"]="9000" ["tirreno"]="8080" ["fx"]="8080" ["database-gateway"]="8080" ["chirpstack"]="8080" ["fleet"]="8080" ["comply"]="8080" ["gophish"]="8080" ["SniperPhish"]="8080" ["mender"]="8080" ["autobom"]="8080" ["easy-gate"]="8080" # Node.js Applications (typically 3000) ["runme"]="3000" ["datahub"]="9002" ["openblocks"]="3000" ["windmill"]="3000" ["midday"]="3000" ["no-code-architects-toolkit"]="3000" ["grist-core"]="8484" ["signoz"]="3301" ["sentry"]="9000" ["docker-drawio"]="8080" ["puter"]="8080" ["puter"]="8080" ["policies"]="3000" ["fonoster"]="3000" # Python Applications (typically 8000) ["docassemble"]="80" ["netbox"]="8000" ["healthchecks"]="8000" ["langfuse"]="3000" ["security-awareness-training"]="8000" ["InvenTree"]="8000" ["nautilus_trader"]="8000" ["satnogs"]="80" ["reviewboard"]="8080" # Java Applications (typically 8080) ["rundeck"]="4440" ["seatunnel"]="8080" ["killbill"]="8080" ["openboxes"]="8080" # PHP Applications (typically 8080) ["corteza"]="8080" ["elabftw"]="8080" ["pimcore"]="8000" # Rust Applications (typically 8080) ["hyperswitch"]="8080" ["rathole"]="8080" ["warp"]="8080" # Ruby Applications (typically 3000) ["huginn"]="3000" ["consuldemocracy"]="3000" # C# Applications (typically 5000) ["PayrollEngine"]="5000" ["Core"]="5000" # C/C++ Applications ["boinc"]="80" ["slurm"]="6817" ["sdrangel"]="80" # Special Cases ["apisix"]="9080" ["jamovi"]="80" ["wireviz-web"]="80" ["WireViz"]="80" ["PLMore"]="8080" ) # Application health check paths declare -A HEALTH_PATHS=( ["goalert"]="/v1/config" ["webhook"]="/" ["runme"]="/health" ["datahub"]="/health" ["netbox"]="/api/status/" ["healthchecks"]="/health/" ["fleet"]="/api/v1/fleet" ["signoz"]="/health" ["sentry"]="/_health/" ["rundeck"]="/api/1/system/info" ["killbill"]="/1.0/healthcheck" ["corteza"]="/" ["huginn"]="/login" ["apisix"]="/apisix/admin/services/" ["grist-core"]="/status" ["windmill"]="/api/status" ["openblocks"]="/api/v1/users/me" ["langfuse"]="/api/health" ["InvenTree"]="/api/status/" ["elabftw"]="/" ["pimcore"]="/" ) # Application descriptions declare -A APP_DESCRIPTIONS=( ["goalert"]="Alerting and on-call management platform for DevOps teams" ["webhook"]="Lightweight incoming webhook server" ["tirreno"]="IP geolocation and intelligence data platform" ["runme"]="Execute markdown files as interactive notebooks" ["datahub"]="Modern data catalog and metadata platform" ["docassemble"]="Open-source expert system for guided interviews" ["pimcore"]="Digital experience platform (PIM/CMS/DAM)" ["database-gateway"]="Database connection gateway and proxy" ["fx"]="Function as a Service platform" ["fonoster"]="Open-source CPaaS (Communication Platform as a Service)" ["rundeck"]="Job scheduling and automation platform" ["hyperswitch"]="Open-source payment processing platform" ["PayrollEngine"]="Payroll calculation and management system" ["openboxes"]="Supply chain and inventory management" ["nautilus_trader"]="Algorithmic trading platform" ["apisix"]="Cloud-native API gateway" ["grist-core"]="Smart documents and spreadsheets platform" ["healthchecks"]="Cron job monitoring service" ["fleet"]="Device management and monitoring platform" ["netbox"]="IP address management (IPAM) and data center infrastructure management" ["seatunnel"]="Data integration and streaming platform" ["rathole"]="Lightweight and high-performance reverse proxy" ["easy-gate"]="Simple gateway and proxy service" ["huginn"]="Web agent system for creating agents that do things online" ["consuldemocracy"]="Democratic decision-making platform" ["boinc"]="Open-source volunteer computing platform" ["slurm"]="Workload manager and job scheduling system" ["chirpstack"]="LoRaWAN network server" ["sdrangel"]="Software defined radio application" ["security-awareness-training"]="Security training and awareness platform" ["signoz"]="Observability platform with logs, traces, and metrics" ["sentry"]="Error tracking and performance monitoring" ["elabftw"]="Electronic lab notebook and research data management" ["jamovi"]="Statistical analysis software" ["reviewboard"]="Code review tool" ["InvenTree"]="Inventory management system" ["mender"]="Over-the-air (OTA) software update manager" ["langfuse"]="LLM engineering platform with observability" ["wireviz-web"]="Cable and wiring harness visualization" ["WireViz"]="Cable and wiring harness documentation tool" ["killbill"]="Subscription and billing management platform" ["autobom"]="Bill of materials (BOM) management and analysis" ["midday"]="Modern operating system for startups" ["openblocks"]="Low-code data application development platform" ["docker-drawio"]="Diagrams.net (draw.io) in Docker" ["satnogs"]="Ground station network for satellite operations" ["Core"]="Emergency services management platform" ["warp"]="Terminal and shell productivity tool" ["windmill"]="Self-hosted workflow automation platform" ["corteza"]="Low-code platform for workflow automation" ["gophish"]="Phishing simulation and awareness training" ["SniperPhish"]="Advanced phishing simulation platform" ["PLMore"]="Unknown application" ["policies"]="Policy management and compliance platform" ["puter"]="Open-source internet OS" ["comply"]="Compliance management platform" ) # Function to update manifest update_manifest() { local app_name="$1" local app_dir="$WORKSPACE/$app_name" local manifest_file="$app_dir/app/manifest.json" if [ ! -f "$manifest_file" ]; then echo "❌ No manifest found for $app_name" return fi local port="${APP_PORTS[$app_name]:-8080}" local health_path="${HEALTH_PATHS[$app_name]:-/}" local description="${APP_DESCRIPTIONS[$app_name]:-Auto-generated Cloudron package for $app_name}" echo "🔧 Updating manifest for $app_name (port: $port, health: $health_path)" cat > "$manifest_file" << EOF { "id": "com.$app_name.cloudron", "title": "$app_name", "version": "1.0.0", "description": "$description", "developer": { "name": "TSYSDevStack Team", "email": "support@tsysdevstack.com" }, "tags": ["productivity", "web-app", "$(echo "${APP_TYPES[$app_name]:-unknown}" | tr '[:lower:]' '[:upper:]')"], "httpPort": $port, "manifestVersion": 2, "healthCheck": { "path": "$health_path", "port": $port }, "memoryLimit": 1073741824, "addons": { "localstorage": true, "postgresql": true, "redis": true, "sendmail": true } } EOF echo "✅ Manifest updated for $app_name" } # Main execution echo "🚀 Updating manifests with correct ports and health checks..." echo "" # Process all applications (hardcoded list) for app_name in goalert webhook tirreno fx rathole nautilus_trader database-gateway runme datahub openblocks windmill midday no-code-architects-toolkit docassemble netbox healthchecks gophish SniperPhish langfuse security-awareness-training rundeck seatunnel killbill elabftw pimcore corteza autobom openboxes hyperswitch boinc slurm chirpstack sdrangel grist-core fleet signoz sentry apisix jamovi reviewboard InvenTree mender wireviz-web WireViz PayrollEngine docker-drawio satnogs Core warp puter comply policies easy-gate huginn consuldemocracy fonoster PLMore; do update_manifest "$app_name" done echo "" echo "🎉 Manifest updates complete!" echo "📊 Updated $(echo "${!APP_TYPES[@]}" | wc -w) manifests" echo ""