Guest User

Log

a guest
Aug 4th, 2021
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1.  
  2. ##
  3. ## After making changes to this file, you MUST rebuild for any changes
  4. ## to take effect in your live Discourse instance:
  5. ##
  6. ## /var/discourse/launcher rebuild app
  7. ##
  8. ## Make sure to obey YAML syntax! You can use this site to help check:
  9. ## http://www.yamllint.com/
  10.  
  11. ## this is the all-in-one, standalone Discourse Docker container template
  12.  
  13. # You may add rate limiting by uncommenting the web.ratelimited template.
  14. # Out of the box it allows 12 reqs a second per ip, and 100 per minute per ip
  15. # This is configurable by amending the params in this file
  16.  
  17. templates:
  18. - "templates/postgres.template.yml"
  19. - "templates/redis.template.yml"
  20. - "templates/web.template.yml"
  21. - "templates/web.ratelimited.template.yml"
  22. - "templates/web.ssl.template.yml"
  23. - "templates/web.letsencrypt.ssl.template.yml"
  24.  
  25. ## which TCP/IP ports should this container expose?
  26. expose:
  27. - "80:80" # fwd host port 80 to container port 80 (http)
  28. - "2222:22" # fwd host port 2222 to container port 22 (ssh)
  29. - "5432:5432"
  30. - "443:443"
  31.  
  32. # any extra arguments for Docker?
  33. # docker_args:
  34.  
  35. params:
  36. db_default_text_search_config: "pg_catalog.english"
  37. ssh_key: "ssh-rsa XXXXXXXXXX [email protected]"
  38. ## Set db_shared_buffers to a max of 25% of the total memory.
  39. ##
  40. ## On 1GB installs set to 128MB (to leave room for other processes)
  41. ## on a 4GB instance you may raise to 1GB
  42. #db_shared_buffers: "256MB"
  43. #
  44. ## Set higher on large instances it defaults to 10MB, for a 3GB install 40MB is a good default
  45. ## this improves sorting performance, but adds memory usage per-connection
  46. #db_work_mem: "40MB"
  47. #
  48. ## Which Git revision should this container use? (default: tests-passed)
  49. #version: v1.5.0.beta3
  50. version: stable
  51.  
  52. env:
  53. LANG: en_US.UTF-8
  54. # DISCOURSE_DEFAULT_LOCALE: en
  55.  
  56. ## TODO: How many concurrent web requests are supported?
  57. ## With 2GB we recommend 3-4 workers, with 1GB only 2
  58. #UNICORN_WORKERS: 3
  59.  
  60. ## TODO: List of comma delimited emails that will be made admin and developer
  61. ## on initial signup example '[email protected],[email protected]'
  62. DISCOURSE_DEVELOPER_EMAILS: '[email protected]'
  63.  
  64. ## TODO: The domain name this Discourse instance will respond to
  65. DISCOURSE_HOSTNAME: 'XXXXXXXXXXX'
  66.  
  67. ## TODO: The mailserver this Discourse instance will use
  68. DISCOURSE_SMTP_ADDRESS: email-smtp.us-east-1.amazonaws.com # (mandatory)
  69. DISCOURSE_SMTP_PORT: 587 # (optional)
  70. DISCOURSE_SMTP_USER_NAME: XXXXXXXXXXXXXXXXXXXXXX # (optional)
  71. DISCOURSE_SMTP_PASSWORD: XXXXXXXXXXXXXXXXXXXXXX # (optional, WARNING the char '#' in pw can cause problems!)
  72. DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  73. DISCOURSE_ENABLE_CORS: true
  74. DISCOURSE_CORS_ORIGIN: '*'
  75.  
  76. LETSENCRYPT_ACCOUNT_EMAIL: '[email protected]'
  77. ## The CDN address for this Discourse instance (configured to pull)
  78. #DISCOURSE_CDN_URL: //discourse-cdn.example.com
  79.  
  80. ## These containers are stateless, all data is stored in /shared
  81. volumes:
  82. - volume:
  83. host: /var/discourse/shared/standalone
  84. guest: /shared
  85. - volume:
  86. host: /var/discourse/shared/standalone/log/var-log
  87. guest: /var/log
  88.  
  89. ## The docker manager plugin allows you to one-click upgrade Discourse
  90. ## http://discourse.example.com/admin/docker
  91. hooks:
  92. after_code:
  93. - exec:
  94. cd: $home/plugins
  95. cmd:
  96. - mkdir -p plugins
  97. - git clone https://github.com/discourse/docker_manager.git
  98. - git clone https://github.com/discourse/discourse-tagging.git
  99. - git clone https://github.com/discourse/discourse-adplugin.git
  100. - git clone https://github.com/discourse/discourse-sitemap
  101. ## Remember, this is YAML syntax - you can only have one block with a name
  102. run:
  103. - exec: echo "Beginning of custom commands"
  104.  
  105. ## If you want to set the 'From' email address for your first registration, uncomment and change:
  106. #- exec: rails r "SiteSetting.notification_email='[email protected]'"
  107. ## After getting the first signup email, re-comment the line. It only needs to run once.
  108.  
  109. ## If you want to configure password login for root, uncomment and change:
  110. ## Use only one of the following lines:
  111. #- exec: /usr/sbin/usermod -p 'PASSWORD_HASH' root
  112. #- exec: /usr/sbin/usermod -p "$(mkpasswd -m sha-256 'RAW_PASSWORD')" root
  113.  
  114. ## If you want to authorized additional users, uncomment and change:
  115. #- exec: ssh-import-id username
  116. #- exec: ssh-import-id anotherusername
  117.  
  118. - exec: echo "End of custom commands"
  119. - 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