---
# Source: discourse/templates/configmaps.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: discourse
  namespace: discourse
data:
  DISCOURSE_HOSTNAME: "{{ .apps.discourse.domain }}"
  DISCOURSE_SKIP_INSTALL: "no"
  DISCOURSE_SITE_NAME: "{{ .apps.discourse.siteName }}"
  DISCOURSE_USERNAME: "{{ .apps.discourse.adminUsername }}"
  DISCOURSE_EMAIL: "{{ .apps.discourse.adminEmail }}"
  DISCOURSE_REDIS_HOST: "{{ .apps.discourse.redisHostname }}"
  DISCOURSE_REDIS_PORT_NUMBER: "6379"
  DISCOURSE_DATABASE_HOST: "{{ .apps.discourse.dbHostname }}"
  DISCOURSE_DATABASE_PORT_NUMBER: "5432"
  DISCOURSE_DATABASE_NAME: "{{ .apps.discourse.dbName }}"
  DISCOURSE_DATABASE_USER: "{{ .apps.discourse.dbUsername }}"

  # DISCOURSE_SMTP_ADDRESS: "{{ .apps.discourse.smtp.host }}"
  # DISCOURSE_SMTP_PORT: "{{ .apps.discourse.smtp.port }}"
  # DISCOURSE_SMTP_USER_NAME: "{{ .apps.discourse.smtp.user }}"
  # DISCOURSE_SMTP_ENABLE_START_TLS: "{{ .apps.discourse.smtp.startTls }}"
  # DISCOURSE_SMTP_AUTHENTICATION: "login"

  # Bitnami specific environment variables (diverges from the original)
  # https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-containers-discourse-index.html
  DISCOURSE_SMTP_HOST: "{{ .apps.discourse.smtp.host }}"
  DISCOURSE_SMTP_PORT_NUMBER: "{{ .apps.discourse.smtp.port }}"
  DISCOURSE_SMTP_USER: "{{ .apps.discourse.smtp.user }}"
  DISCOURSE_SMTP_ENABLE_START_TLS: "{{ .apps.discourse.smtp.startTls }}"
  DISCOURSE_SMTP_AUTH: "login"
  DISCOURSE_SMTP_PROTOCOL: "tls"

  DISCOURSE_PRECOMPILE_ASSETS: "false"

  # SMTP_HOST: "{{ .apps.discourse.smtp.host }}"
  # SMTP_PORT: "{{ .apps.discourse.smtp.port }}"
  # SMTP_USER_NAME: "{{ .apps.discourse.smtp.user }}"
  # SMTP_TLS: "{{ .apps.discourse.smtp.tls }}"
  # SMTP_ENABLE_START_TLS: "{{ .apps.discourse.smtp.startTls }}"
  # SMTP_AUTHENTICATION: "login"
