Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- templates:
- - "templates/postgres.template.yml"
- - "templates/redis.template.yml"
- - "templates/web.template.yml"
- - "templates/sshd.template.yml"
- - "templates/web.ratelimited.template.yml"
- expose:
- - "6080:80" # fwd host port 80 to container port 80 (http)
- - "2222:22" # fwd host port 2222 to container port 22 (ssh)
- params:
- db_default_text_search_config: "pg_catalog.english"
- db_shared_buffers: "128MB"
- env:
- LANG: en_US.UTF-8
- UNICORN_WORKERS: 2
- DISCOURSE_DEVELOPER_EMAILS: 'marijnh@gmail.com'
- DISCOURSE_HOSTNAME: 'discuss.codemirror.net'
- DISCOURSE_SMTP_ADDRESS: 172.17.42.1
- DISCOURSE_SMTP_PORT: 25
- DISCOURSE_SMTP_ENABLE_START_TLS: false # (optional, default true)
- volumes:
- - volume:
- host: /var/discourse/shared/standalone
- guest: /shared
- - volume:
- host: /var/discourse/shared/standalone/log/var-log
- guest: /var/log
- hooks:
- after_postgres:
- - exec: sudo -u postgres createdb pm_discourse || exit 0
- - exec:
- stdin: |
- grant all privileges on database pm_discourse to discourse;
- cmd: sudo -u postgres psql pm_discourse
- raise_on_fail: false
- - exec: /bin/bash -c 'sudo -u postgres psql pm_discourse <<< "alter schema public owner to discourse;"'
- - exec: /bin/bash -c 'sudo -u postgres psql pm_discourse <<< "create extension if not exists hstore;"'
- - exec: /bin/bash -c 'sudo -u postgres psql pm_discourse <<< "create extension if not exists pg_trgm;"'
- - exec: sudo -u postgres createdb tern_discourse || exit 0
- - exec:
- stdin: |
- grant all privileges on database tern_discourse to discourse;
- cmd: sudo -u postgres psql tern_discourse
- raise_on_fail: false
- - exec: /bin/bash -c 'sudo -u postgres psql tern_discourse <<< "alter schema public owner to discourse;"'
- - exec: /bin/bash -c 'sudo -u postgres psql tern_discourse <<< "create extension if not exists hstore;"'
- - exec: /bin/bash -c 'sudo -u postgres psql tern_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: pm_discourse
- pool: 5
- timeout: 5000
- db_id: 2
- host_names:
- - discuss.prosemirror.net
- thirdsite:
- adapter: postgresql
- database: tern_discourse
- pool: 5
- timeout: 5000
- db_id: 2
- host_names:
- - discuss.ternjs.net
- after_bundle_exec:
- - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate
- run:
- - exec: echo "Beginning of custom commands"
- - exec: echo "End of custom commands"
- - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement