# One plugins.yml file for two discourse sites

**URL:** <https://meta.discourse.org/t/one-plugins-yml-file-for-two-discourse-sites/160005>\
**Category:** Product Support\
**Created:** [August 6, 2020, 9:52am UTC](https://meta.discourse.org/t/one-plugins-yml-file-for-two-discourse-sites/160005 "2020-08-06T09:52:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [August 6, 2020, 11:28am UTC](https://meta.discourse.org/t/one-plugins-yml-file-for-two-discourse-sites/160005/2 "2020-08-06T11:28:39Z")

</div>

Hi @IAmGav

This may not be exactly what you are looking for; and I have not fully worked this out yet, but here is the gist of it:

1. Create a directory `/var/discourse/mytemplates`
2. Add a new template file called `plugins.templates.yml` in that directory, for example:

```plaintext
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-bbcode.git
          - git clone https://github.com/discourse/discourse-sitemap.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-whos-online.git
          - git clone https://github.com/discourse/discourse-checklist.git

```

1. Create a new git repo for that directory and push it to github.
2. Add a template to your `yml` files for these plugins, for example:

```plaintext
templates:
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.socketed.template.yml"
  - "mytemplates/plugins.template.yml"

```

I have already tested up to this point, and I can add plugins and build the container using a template file in this manner, no problem.

The only piece I have not tested yet is to add a line or two in launcher to pull the repo; and frankly, I have not worked on this part yet.

```plaintext
 git clone https://github.com/my_super_repo/mytemplates.git

```

Even though I have not worked on this part yet, but I’m sure it is doable; because I have already tested the part about pulling in the plugins in the container build from a template, and it works fine; so the only piece left for this approach is to add code to launcher and test it to pull the `mytemplates` repo from github.

However, to be frank; this technique seems like a lot of unnecessary work:

- Editing `launcher` to pull the template from a repo
- Adding a new template entry to the `yml` file (for the plugins)

It is so easy to copy-and-paste into the `yml` files and “be done with it”; but I also find this idea interesting. Sys admin puzzles are always fun for me, so it was fun to think about this for you.

Anyway, the short answer to your question @IAmGav is that “yes, it is doable” and of course, if you want to try it, then “go for it”.

Hope this helps.

---

_[View the full topic](https://meta.discourse.org/t/one-plugins-yml-file-for-two-discourse-sites/160005)._
