Talk:Discuss

From Noisebridge
Jump to: navigation, search

hooks:

 after_postgres:
    - exec: sudo -u postgres createdb b_discourse || exit 0
    - exec:
         stdin: |
           grant all privileges on database b_discourse to discourse;
         cmd: sudo -u postgres psql b_discourse
         raise_on_fail: false
    - exec: /bin/bash -c 'sudo -u postgres psql b_discourse <<< "alter schema public owner to discourse;"'
    - exec: /bin/bash -c 'sudo -u postgres psql b_discourse <<< "create extension if not exists hstore;"'
    - exec: /bin/bash -c 'sudo -u postgres psql b_discourse <<< "create extension if not exists pg_trgm;"'
 after_code:
   - exec:
       cd: $home/plugins
       cmd:
         - mkdir -p plugins
         - git clone https://github.com/discourse/docker_manager.git
 before_bundle_exec:
   - file:
       path: $home/config/multisite.yml
       contents: |
        secondsite:
          adapter: postgresql
          database: b_discourse
          pool: 25
          timeout: 5000
          db_id: 2
          host_names:
            - test-discuss.noisebridge.info
 after_bundle_exec:
   - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate