I’m installing Discourse (ditnami-discourse) within a very restricted environment. The VM has no access to github, for instance. The mechanism bitnami-discourse uses for plugin installation is:
Via an alternative route I’ve placed (cloned) the plugin repo’s in de plugins directory. Unfortunately (for me) “RAILS_ENV=production bundle exec rake plugin:install” seems to do more then just clone the repo in the plugins directory. Because when I run “RAILS_ENV=production bundle exec rake assets:precompile” the plugins are not being picked up. Is there an option to do something like ?:
I could have asked the exact same question if I was using the officially supported method. The installation method is not the issue. A way to install plugins without direct access to github is.
Edit: I might decide to use the official method in a later stage anyway. In that case the question remains the same.
The github plugin repo clones are already in place within the plugins directory. They just aren’t picked up by the assets:precompile hook. I need an alternative way of running plugin:install, because I can’t provide a working repo url (github.com is blocked).
Edit: the machine doesn’t have access to any git server, unfortunately.
plugin:install is not a thing for official Discourse.
The only official way to install plugins is the one we describe on every approved install app.yml, and that has 0 problems with ordering of the precompile assets task.
Ok. So if I use the official installation method, I can just place (rsync) git clones of the plugins into the /plugins directory, run assets:precompile, and the plugins will be installed? If that is the case I will try and find a way to use the supported method (which won’t be easy because of all the restrictions the machine has in place).
As I’ve said. I can’t access (or install) any git repositories on the VM.
If you use the official way, there will be no need to manually run assets:precompile.
Just install the plugins in the same place the default plugin is installed and follow along.
As said above there are a multitude of ways to get the code inside the container (wget, curl, rsync, scp). Since you are the only one familiar with the environment, you will have to pick the more appropriate one.
One thing you can do, is to bootstrap the docker container elsewhere (./launcher bootstrap app step in our official guide) and then move the resulting image into the server with restricted access and run the image from there. That will require some docker-fu, but in my experience those heavily restricted environments are all about making the every day to day tasks a lot harder anyway.
Thank you for your support. I’ve created a bootstrapped image on a different machine (that does have access to github). I’ve pushed that image to our local Docker registry and pulled the image on the machine that can’t access github. When I try to run the image I still get the following error and the container won’t start. Anything I can do about that? I’m using the officially supported method now!
fatal: unable to access 'https://github.com/discourse/pups.git/': Could not resolve host: github.com
Also, are you 100% sure you saved the bootstraped image to the local registry local_discourse/app:latest instead of the base image discourse/base:2.0.20190217 ?
I was able to boot the app while disabling my network interface just fine.
On the server you’d like to create the discourse container, create a docker-compose.yaml file for your application (configure it to your specifications with something like…)