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.

66 lines
2.0 KiB

2 months ago
2 months ago
2 months ago
2 months 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. volumes:
  31. - volume:
  32. host: /var/discourse/shared/web-only
  33. guest: /shared
  34. - volume:
  35. host: /var/discourse/shared/web-only/log/var-log
  36. guest: /var/log
  37. ## Plugins go here
  38. ## see https://meta.discourse.org/t/19157 for details
  39. hooks:
  40. after_code:
  41. - exec:
  42. cd: $home/plugins
  43. cmd:
  44. - git clone https://github.com/discourse/docker_manager.git
  45. {%- if services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.plugins %}
  46. {%- for plugin in services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.plugins %}
  47. - git clone {{ plugin }}
  48. {%- endfor %}
  49. {%- endif %}
  50. ## Remember, this is YAML syntax - you can only have one block with a name
  51. run:
  52. - exec: echo "Beginning of custom commands"
  53. - exec: echo "End of custom commands"