Multisite configuration with Docker


(Jay Pfaffman) #138

Hey, @mpalmer, this seems like the problem I am having.

(veblock) #139

Ok, finally got it figured out. For those struggling with mulitsite + multicontainer setup please note the sample in the first post is not complete. You do need host and password specified in your secondsite section

    - file:
        path: $home/config/multisite.yml
        contents: |
           adapter: postgresql
           database: b_discourse
           host: data
           password: <DiscourseUserPGPassword>
           pool: 25
           timeout: 5000
           db_id: 2

Hope that helps someone.

(Felix Freiberger) #140

After quite some time, I can report that this worked! :tada:

The correct order seems to be:

  1. Amend multisite.yml.
  2. Create and migrate the DB with my script above and @pfaffman’s bugfix.
  3. Restart the container.

(Brahn) #141

The difference is multisite vs multisite+multicontainer. If you are just running multiple sites in the same container then you don’t need the host/password.

(veblock) #142

@brahn you’re right. It’s taken me some time to finally get it.