Install plugins on a self-hosted site

What would have helped me was if these instructions said something like, “Hey dummy! Don’t run the git clone command from the shell. Just add the command to the app.yml file per the example, make sure the indents are correct, save it, and then run the rebuild command.”

These instructions could also be clearer when -E -u are necessary and when they are not.

I did some other dumb things to before I succeeded. When I look at the instructions now, they make nearly perfect sense. But I fell into several pitfalls that I might have avoided if these instructions were written considering noobs like me would be trying to follow them.

3 Likes

I’m no expert, so bear with me…
Yesterday I installed Discourse and now I’m trying to install a plugin.
Do I need to run:
./launcher rebuild app

or can I just run:
./launcher destroy app
and then
./launcher start app
?

Running ./launcher rebuild app takes a long time and my website stops working or it becomes super slow.

Rebuilding is the only way to install plugins. Destroying and starting use only the old configuration.

But don’t destroy anything before rebuilding. Because if rebuild fails you can put old one online using start.

You have one container setup, right? Then that forum will be offline, because first rebuilding will stop your container. And yes, it takes long time to rebuild.

There is two container setup two, and then offline time is few minutes. But don’t change to it before you are comfortable with these basic operations.

1 Like

Hi,
Is this the only way to install plugins?
Because I am deployed in the company’s intranet environment, my access to the external network fluctuates greatly, and I often fail to access it when I execute the. /launcher rebuild app. Is there any way to download the plugins offline and then deploy it?

Yes, you must rebuild when adding or removing a plugin.

Theme Components, on the other hand, do not require this as they only impact the front end. So look at that option if you can.

Thank you for your reply.
Because I just started using discourse, I still have a question to ask.
For example, I updated app.yml and added a plugin, but it seems that when rebuild, even if it is not the first time to deploy, what was pulled and installed before will be downloaded again?
Such as ruby or installed plugins.

1 Like

Docker images should be cached, but some clones may happen again because it’s a new container.

1 Like

But wouldn’t it be possible copy whole repo(s) and give local address?

1 Like

Yep. You could try that. But it would complicate the upgrade process.

If you’re getting disconnected while the rebuild is running, you can use tmux or screen.

It’s possible to build the container elsewhere, push it to the repo and then launch it on your site (you also need to migrate the database and precompile the assets).

1 Like

Ok, thanks, I see.

I save the plugins to the local gitlab and pull it locally during rebuid, which is much more convenient.

OK, i will try