Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ObjectiveTruth
Copy link

Pull Request Checklist

  • Have you read How to write the perfect pull request?
  • Have you read through the contributor guidelines?
  • Have you signed the Lightbend CLA?
  • Have you [squashed your commits]? (Optional, but makes merge messages nicer.)
  • Have you added copyright headers to new files?
  • Have you checked that both Scala and Java APIs are updated?
  • Have you updated the documentation for both Scala and Java sections?
  • Have you added tests for any changed functionality?

Helpful things

Fixes

Fixes #xxxx

Purpose

What does this PR do?

Background Context

Why did you take this approach?

References

Are there any relevant issues / PRs / mailing lists discussions?

Had an issue that seemed silly, so I updated the docs with it explicitly. Basically you can't name your Env variables the same as the variables

@lightbend-cla-validator
Copy link

Hi @ObjectiveTruth,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@ObjectiveTruth ObjectiveTruth changed the title Added advice for production env variables [doc]Added advice for production env variables Aug 2, 2016

Here, the override field `my.key = ${?MY_KEY_ENV}` simply vanishes if there's no value for `MY_KEY_ENV`, but if you set an environment variable `MY_KEY_ENV` for example, it would be used.

Because you can reference variables from withing other variables, ensure you don't name your environmental variable the same as the field name.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/withing/within/

@gmethvin
Copy link
Member

gmethvin commented Aug 2, 2016

@ObjectiveTruth
Copy link
Author

ObjectiveTruth commented Aug 2, 2016

Is it worth mentioning this other special case? https://github.com/typesafehub/config#note-about-resolving-substitutions-in-referenceconf-and-applicationconf

I don't think so, because that's more a best practice than a gotcha. If the user is expecting support for programmatic operations in their *.conf file, that probably means they don't understand what the *.conf files are used for, or will look up more info themselves.

Had an issue that seemed silly, so I updated the docs with it explicitly. Basically you can't name your Env variables the same as the variables
@gmethvin gmethvin merged commit a845cf9 into playframework:2.5.x Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants