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.

67 lines
2.1 KiB

1 month ago
1 month ago
1 month ago
  1. ---
  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 #FIXME: does it work?
  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. DOCKER_USE_HOSTNAME: true
  18. DISCOURSE_SMTP_ADDRESS: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.smtp.server }}
  19. DISCOURSE_SMTP_PORT: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.smtp.port }}
  20. DISCOURSE_SMTP_USER_NAME: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.smtp.username }}
  21. DISCOURSE_SMTP_PASSWORD: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.smtp.password }}
  22. DISCOURSE_DEVELOPER_EMAILS: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.admin.email }}
  23. DISCOURSE_NOTIFICATION_EMAIL: noreply@{{ env.APP_DOMAIN }}
  24. DISCOURSE_DB_NAME: {{ env.APP_NAME }}
  25. DISCOURSE_DB_USERNAME: {{ env.APP_NAME }}
  26. DISCOURSE_DB_PASSWORD: {{ env.APP_NAME }}
  27. DISCOURSE_DB_HOST: ct1.lxd
  28. DISCOURSE_REDIS_HOST: ct1.lxd
  29. DISCOURSE_REDIS_PASSWORD: {{ env.APP_REDIS_PASSWORD }}
  30. DISCOURSE_REDIS_DB: {{ env.APP_REDIS_DB }}
  31. volumes:
  32. - volume:
  33. host: /var/discourse/shared/web-only
  34. guest: /shared
  35. - volume:
  36. host: /var/discourse/shared/web-only/log/var-log
  37. guest: /var/log
  38. ## Plugins go here
  39. ## see https://meta.discourse.org/t/19157 for details
  40. hooks:
  41. after_code:
  42. - exec:
  43. cd: $home/plugins
  44. cmd:
  45. - git clone https://github.com/discourse/docker_manager.git
  46. {%- if services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.plugins %}
  47. {%- for plugin in services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.plugins %}
  48. - git clone {{ plugin }}
  49. {%- endfor %}
  50. {%- endif %}
  51. ## Remember, this is YAML syntax - you can only have one block with a name
  52. run:
  53. - exec: echo "Beginning of custom commands"
  54. - exec: echo "End of custom commands"