How to update a plugin without rebuild docker?


(Daniela) #1

Sometimes happens that we need to update a plugin.
The easiest way is doing the update when we upgrade discourse. But we need to do that in the middle of the night because we have to rebuild the container.

Is there a way to update only a plugin without rebuild docker?
Running the command
rake plugin:update plugin=discourse-name_of_plugin
is safe or is it possible that we broken something?

Better ask before so I don’t cry after…


(Felix Freiberger) #2

You should be able to start the upgrade from /admin/upgrade:


(Daniela) #3

Thank you for your clarification @fefrei. I totally forgot this page!


(Bruno) #4

I’m not sure if there’s something to add to the plugin, but we created a custom plugin to manage subscriptions inside my forum (to create and delete users based on POST notifications), and even when we hit “Upgrade” just for the plugin, it still seems it rebuilds the whole thing.

Maybe we are doing something wrong, not sure.

Is there a way to rebuild ONLY the plugin (so it’s faster) without breaking things down?

Or the whole app rebuild is necessary?


(Felix Freiberger) #5

Using the web updater should only update the plugin, without any (noticeable) downtime.


(Mittineague) #6

That may be true. But depending on what the plugin does, any changes won’t take effect until a rebuild.


(Felix Freiberger) #7

Interesting – I didn’t know that. What changes aren’t caught by the steps the upgrader takes?


(Mittineague) #8

Maybe things have changed since last I looked.

I was under the impression that anything (assets) that was cached would be used before anything new.

But seeing

run("bundle exec rake assets:precompile")

makes me think that has since changed.