In a discussion titled “How to run Upgrade All from command line?” in the Support category, yanokwa seeks to minimize downtime during Discourse upgrades by running them via command line on a stock install. pfaffman suggests that a two-container setup — separating web and data — is essentially the stock configuration and best suited for minimizing downtime. Later, yanokwa shares that as of a recent update, upgrades can now be triggered via API using curl. The command to upgrade all components is:
The path parameter can also target specific plugins (e.g., /var/www/discourse/plugins/discourse-solved). The underlying API, documented at docker_manager/manager-client/app/models/repo.js#L134, supports checking versions, initiating upgrades, and monitoring progress — with appropriate use of GET or POST requests. This solution enables automated, low-downtime upgrades without requiring container separation, fulfilling yanokwa’s original goal.
I have noticed that the “Upgrade All” button at /admin/upgrade does an upgrade that minimizes the downtime, so I’d to run whatever it runs at the command line. Anyone know how to do that?
path can be an absolute link to the plugin repo’s location on disk. So if you want run this on the discourse-solved plugin, you’d set path to /var/www/discourse/plugins/discourse-solved
There’s a pretty good API at starting at docker_manager/manager-client/app/models/repo.js#L134 that lets you find the latest versions, upgrade, and check progress. Don’t forget to the call from POST to GET as necessary.