Skip to content

Only set DATABASE_URL env var if helm value exists

This change allows a project to suppress the injection of the DATABASE_URL variable by the auto-deploy-app chart.

Currently, a DATABASE_URL variable is always injected. Since this variable shadows any other injected DATABASE_URL env var (for instance from secrets), people currently cannot use this env var in any way other then to specify it (as DATABASE_URL) in their CI/CD variables.

This change allows people to specify

application:
  database_url: null

in their auto-deploy-values.yaml and prevent the DATABASE_URL env var to be injected. This change should be completely backwards compatible with any previous deployment using this image.

This provides a (partial) fix for #90 (closed). It provides a workaround, but a more ergonomic solution (using env variables) might be more appropriate on the long term.

Edited by Hidde-Jan Jongsma

Merge request reports