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.2 KiB

  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.discourse.smtp.server }}
  19. DISCOURSE_SMTP_PORT: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.port }}
  20. DISCOURSE_SMTP_USER_NAME: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.username }}
  21. DISCOURSE_SMTP_PASSWORD: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.smtp.password }}
  22. DISCOURSE_DEVELOPER_EMAILS: {{ services[env.APP_DOMAIN][env.APP_SUBDOMAIN].data.discourse.admin }}
  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. volumes:
  30. - volume:
  31. host: /var/discourse/shared/web-only
  32. guest: /shared
  33. - volume:
  34. host: /var/discourse/shared/web-only/log/var-log
  35. guest: /var/log
  36. ## Plugins go here
  37. ## see https://meta.discourse.org/t/19157 for details
  38. hooks:
  39. after_code:
  40. - exec:
  41. cd: $home/plugins
  42. cmd:
  43. - git clone https://github.com/discourse/docker_manager.git
  44. {%- if services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %}
  45. {%- for plugin in services[env.APP_DOMAIN][env.APP_SUBDOMAIN]['data']['discourse']['plugins'] %}
  46. - git clone {{ plugin }}
  47. {%- endfor %}
  48. {%- endif %}
  49. ## Remember, this is YAML syntax - you can only have one block with a name
  50. run:
  51. - exec: echo "Beginning of custom commands"
  52. - exec: echo "End of custom commands"
  53. - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'