apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "erp.name" . }}-config
  namespace: {{ .Release.Namespace }}
# Doc: https://hub.docker.com/r/dolibarr/dolibarr https://github.com/Dolibarr/dolibarr-docker
data:
  DOLI_DB_TYPE: pgsql
  DOLI_DB_HOST: pgbouncer.tools
  DOLI_DB_HOST_PORT: !!str 5432
  # DOLI_DB_USER: root
  # DOLI_DB_PASSWORD: root
  DOLI_DB_NAME: {{ .Values.db.name }}
  DOLI_URL_ROOT: 'https://{{ .Values.host }}'
  # DOLI_ADMIN_LOGIN: 'admin'
  # DOLI_ADMIN_PASSWORD: 'admininitialpassword'
  DOLI_ENABLE_MODULES: Societe,Facture
  DOLI_COMPANY_NAME: Arcodange
  DOLI_COMPANY_COUNTRYCODE: FR
  PHP_INI_DATE_TIMEZONE: Europe/Paris
  DOLI_AUTH: dolibarr
  DOLI_CRON: !!str 0
  {{- if ne .Values.env "prod" }}
  # Non-prod (sandbox): dev mode — render real errors inline instead of the generic
  # prod "technical error" banner. Prod keeps the image default (DOLI_PROD=1).
  DOLI_PROD: !!str 0
  {{- end }}
  # DOLI_INSTANCE_UNIQUE_ID: <random salt for encryption>