Uploaded image for project: 'ColdBox Platform'
  1. COLDBOX-644

Change default environment detection to an environment variable

    Details

    • Type: Improvement
    • Status: Resolved (View workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Application Templates
    • Labels:
      None

      Description

      Instead of the environments struct, the default environment detection in ColdBox 5 will be like so:

      function detectEnvironment() {
          return getSystemSetting( "ENVIRONMENT", "development" );
      }
      

      This will look for an ENV var or Java System property of ENVIRONMENT and use that value as the environment name. If none is set, development will be used.

      This is useful in situations like Docker containers where the container may ping itself at localhost, confusing the CGI lookup for environments.

      Users can always go back to using the old environment structs.

        Gliffy Diagrams

          Attachments

            Issue links

              Activity

                People

                • Assignee:
                  lmajano Luis Majano
                  Reporter:
                  elpete Eric Peterson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: