Feature #45851

Allow referencing environment variables in Settings.yaml

Added by Adrian Föder over 8 years ago. Updated over 8 years ago.

Status:
Needs Feedback
Priority:
Could have
Assignee:
Category:
-
Target version:
-
Start date:
2013-02-26
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Actual use case is Amazon AWS, where stuff like database credentials are present as environment variables.
It should be possible to use these environment variables directly in the YAML files, just like it's already possible with PHP constants.
The question is a useful syntax; I found in Rails there is an analogy that would look like the following:

  TYPO3:
    Flow:
      persistence:
        backendOptions:
          password: <% ENV['RDS_PASSWORD'] %>

What do you think?


Related issues

Related to TYPO3.Flow - Feature #26783: Support settings via OS EnvironmentRejectedChristian Müller2011-05-12

Actions
#1

Updated by Bastian Waidelich over 8 years ago

  • Status changed from New to Needs Feedback

HI Adrian,

if I get it right this is a duplicate of #26783 which has been rejected

#2

Updated by Adrian Föder over 8 years ago

Hi Bastian,
actually chatted with Christian about it, it's rather the vice versa case of the initial feature.
Initially (#26783) it was planned to override Settings with a manual environment variable setting, for example

SetEnv FLOW3_FLOW3_PERSISTENCE_BACKENDOPTIONS_PASSWORD "mypassword" 

affecting the Setting for TYPO3.Flow.persistence....

I meant the exact other way round: referencing given env vars from the setting. I tend to clarify it but realize that it'll be just the same I wrote initially, so please have a new look at the initial issue :)

#3

Updated by Bastian Waidelich over 8 years ago

Adrian Föder wrote:

I tend to clarify it but realize that it'll be just the same I wrote initially, so please have a new look at the initial issue :)

My bad, it's clear enough – I just had the other issue in the back of my head and referenced it w/o checking again. Makes sense IMO but I'm not so happy with the syntax <% ENV['RDS_PASSWORD'] %> yet

Also available in: Atom PDF