provisioning tool for building opinionated architecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.6 KiB

  1. # TODO: change SOME_SECRET in this template
  2. templates:
  3. - "templates/web.template.yml"
  4. - "templates/web.ratelimited.template.yml"
  5. expose:
  6. - "{{ env.APP_PORT }}:80"
  7. params:
  8. ## Which Git revision should this container use? (default: tests-passed)
  9. #version: tests-passed
  10. version: latest-release
  11. env:
  12. DISCOURSE_HOSTNAME: '{{ env.APP_FQDN }}'
  13. LC_ALL: en_US.UTF-8
  14. LANG: en_US.UTF-8
  15. LANGUAGE: en_US.UTF-8
  16. # DISCOURSE_DEFAULT_LOCALE: en
  17. ## Uncomment if you want the container to be started with the same
  18. ## hostname (-h option) as specified above (default "$hostname-$config")
  19. DOCKER_USE_HOSTNAME: true
  20. ## TODO: List of comma delimited emails that will be made admin and developer
  21. ## on initial signup example 'user1@example.com,user2@example.com'
  22. DISCOURSE_DEVELOPER_EMAILS: 'pvincent@artcode.re'
  23. ## TODO: The SMTP mail server used to validate new accounts and send notifications
  24. # SMTP ADDRESS, username, and password are required
  25. # WARNING the char '#' in SMTP password can cause problems!
  26. DISCOURSE_SMTP_ADDRESS: mail1.zourit.net
  27. DISCOURSE_SMTP_PORT: 587
  28. DISCOURSE_SMTP_USER_NAME: postmaster@artcode.re
  29. DISCOURSE_SMTP_PASSWORD: bHv5mTYyh3aJJKw
  30. #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  31. #DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers)
  32. #DISCOURSE_NOTIFICATION_EMAIL: noreply@discourse.example.com # (address to send notifications from)
  33. ## TODO: configure connectivity to the databases
  34. DISCOURSE_DB_NAME: libre.re
  35. DISCOURSE_DB_USERNAME: libre.re
  36. DISCOURSE_DB_PASSWORD: libre.re
  37. DISCOURSE_DB_HOST: ct1.lxd
  38. DISCOURSE_REDIS_HOST: ct1.lxd
  39. volumes:
  40. - volume:
  41. host: /var/discourse/shared/web-only
  42. guest: /shared
  43. - volume:
  44. host: /var/discourse/shared/web-only/log/var-log
  45. guest: /var/log
  46. ## Plugins go here
  47. ## see https://meta.discourse.org/t/19157 for details
  48. hooks:
  49. after_code:
  50. - exec:
  51. cd: $home/plugins
  52. cmd:
  53. - git clone https://github.com/discourse/docker_manager.git
  54. {%- if services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %}
  55. {%- for plugin in services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %}
  56. - git clone {{ plugin }}
  57. {%- endfor %}
  58. {%- endif %}
  59. ## Remember, this is YAML syntax - you can only have one block with a name
  60. run:
  61. - exec: echo "Beginning of custom commands"
  62. - exec: echo "End of custom commands"
  63. - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'