Advertisement
Guest User

Untitled

a guest
May 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. templates:
  2. - "templates/postgres.template.yml"
  3. - "templates/redis.template.yml"
  4. - "templates/web.template.yml"
  5. - "templates/sshd.template.yml"
  6. - "templates/web.ratelimited.template.yml"
  7.  
  8. expose:
  9. - "6080:80" # fwd host port 80 to container port 80 (http)
  10. - "2222:22" # fwd host port 2222 to container port 22 (ssh)
  11.  
  12.  
  13. params:
  14. db_default_text_search_config: "pg_catalog.english"
  15.  
  16. db_shared_buffers: "128MB"
  17.  
  18. env:
  19. LANG: en_US.UTF-8
  20.  
  21. UNICORN_WORKERS: 2
  22.  
  23. DISCOURSE_DEVELOPER_EMAILS: 'marijnh@gmail.com'
  24.  
  25. DISCOURSE_HOSTNAME: 'discuss.codemirror.net'
  26.  
  27. DISCOURSE_SMTP_ADDRESS: 172.17.42.1
  28. DISCOURSE_SMTP_PORT: 25
  29. DISCOURSE_SMTP_ENABLE_START_TLS: false # (optional, default true)
  30.  
  31.  
  32. volumes:
  33. - volume:
  34. host: /var/discourse/shared/standalone
  35. guest: /shared
  36. - volume:
  37. host: /var/discourse/shared/standalone/log/var-log
  38. guest: /var/log
  39.  
  40. hooks:
  41. after_postgres:
  42. - exec: sudo -u postgres createdb pm_discourse || exit 0
  43. - exec:
  44. stdin: |
  45. grant all privileges on database pm_discourse to discourse;
  46. cmd: sudo -u postgres psql pm_discourse
  47. raise_on_fail: false
  48.  
  49. - exec: /bin/bash -c 'sudo -u postgres psql pm_discourse <<< "alter schema public owner to discourse;"'
  50. - exec: /bin/bash -c 'sudo -u postgres psql pm_discourse <<< "create extension if not exists hstore;"'
  51. - exec: /bin/bash -c 'sudo -u postgres psql pm_discourse <<< "create extension if not exists pg_trgm;"'
  52.  
  53. - exec: sudo -u postgres createdb tern_discourse || exit 0
  54. - exec:
  55. stdin: |
  56. grant all privileges on database tern_discourse to discourse;
  57. cmd: sudo -u postgres psql tern_discourse
  58. raise_on_fail: false
  59.  
  60. - exec: /bin/bash -c 'sudo -u postgres psql tern_discourse <<< "alter schema public owner to discourse;"'
  61. - exec: /bin/bash -c 'sudo -u postgres psql tern_discourse <<< "create extension if not exists hstore;"'
  62. - exec: /bin/bash -c 'sudo -u postgres psql tern_discourse <<< "create extension if not exists pg_trgm;"'
  63.  
  64.  
  65. after_code:
  66. - exec:
  67. cd: $home/plugins
  68. cmd:
  69. - mkdir -p plugins
  70. - git clone https://github.com/discourse/docker_manager.git
  71.  
  72. before_bundle_exec:
  73. - file:
  74. path: $home/config/multisite.yml
  75. contents: |
  76. secondsite:
  77. adapter: postgresql
  78. database: pm_discourse
  79. pool: 5
  80. timeout: 5000
  81. db_id: 2
  82. host_names:
  83. - discuss.prosemirror.net
  84.  
  85. thirdsite:
  86. adapter: postgresql
  87. database: tern_discourse
  88. pool: 5
  89. timeout: 5000
  90. db_id: 2
  91. host_names:
  92. - discuss.ternjs.net
  93.  
  94. after_bundle_exec:
  95. - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate
  96.  
  97. run:
  98. - exec: echo "Beginning of custom commands"
  99.  
  100.  
  101.  
  102.  
  103. - exec: echo "End of custom commands"
  104. - 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