How to run Upgrade All from command line?

My high-level goal here is to run upgrades from the command line and minimize downtime when running those upgrades.

I understand that I can separate web and data containers, but my hope is for something I can run on a stock install.

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?

A two container install is pretty much a stock install. If what you want is

Then a two-container install is what you want.

1 Like

As of a few days ago, it’s now possible to do upgrades via API (and thus curl). Thanks to @Osama for helping me with this!

To upgrade all, run this command:

curl -X POST "https:/" \
-H "Content-Type: application/x-www-form-urlencoded;" \
-d "path=all" \
-d "api_key=1234" \
-d "api_username=system"

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.