-
Notifications
You must be signed in to change notification settings - Fork 5
dokploy_deploy_running_apps.sh
Corey Watson edited this page Dec 1, 2025
·
1 revision
Automatically deploys all running Dokploy applications.
Automatically fetches all Dokploy applications and triggers deployments for running applications while skipping idle ones. Uses the Dokploy API to retrieve application status and initiate deployments with proper error handling.
Automates the deployment process for all running Dokploy applications. Fetches application metadata via the Dokploy API, checks each app's status, and triggers deployments only for apps that are currently running. Idle applications are skipped to prevent unnecessary resource usage and deployment conflicts.
- curl installed
- Network connectivity to Dokploy domain
- Valid Dokploy API token with deployment permissions
- Dokploy domain properly configured
- DOKPLOY_DOMAIN: Your Dokploy domain (e.g., "app.dokploy.com")
- API_TOKEN: API token from Dokploy profile settings
- Fetches all application IDs from Dokploy via API
- Iterates through each application ID
- Retrieves application info including status, name, and project
- Skips applications with "idle" status
- Triggers deployment for applications with "running" status
- Displays progress and results for each application
- Adds 2-second delay between deployments to avoid API rate limits
- API token must be kept secure and not committed to version control
- Replace API_TOKEN placeholder before running
- API calls use HTTPS for encrypted communication
- No sensitive data logged to console
- 0: Success (all deployments processed)
- 1: Failure (error occurred during execution)
➡️ Fetching all application IDs...
✅ Found all applications. Starting status check...
------------------------------------------------
Fetching info for app: abc123def456
🟡 Skipping 'idle' app: Project: MyProject, App: MyApp (ID: abc123def456)
------------------------------------------------
Fetching info for app: xyz789ghi012
🚀 Triggering deployment for 'running' app (running): Project: WebApp, App: Frontend (ID: xyz789ghi012)
✔️ Deployment triggered for WebApp - Frontend.
------------------------------------------------
🎉 All deployments have been processed!
- v1.0.0 (2024-11-18): Initial release with Limehawk Style A formatting
- View Script Source
- Scripts - Back to script index