Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netlify template.environment vs build.environment vs .env file vs config.toml #935

Closed
goldcoders opened this issue Jun 2, 2020 · 1 comment

Comments

@goldcoders
Copy link

I know this question is very trivial,
I just wanna know the sequence how ENV VAR is injected
let say i have this

[template.environment]
  HUGO_BASEURL = "add your custom domain name url with https protocol"
  PAYMONGO_EMAIL = "type here your paymongo username/email"
  PAYMONGO_PASS = "type here your paymongo password"
  SES_ACCESS_KEY = "type here your AWS SES Access Key"
  SES_SECREKT_KEY = "type here your AWS SES Secret Key"

[build.environment]
  HUGO_BASEURL = "https://hugo-theme-twal-starter.netlify.app"
  HUGO_VERSION = "0.72.0"
  HUGO_THEME = "repo"
  HUGO_ENVIRONMENT = "production"
  HUGO_ENABLEGITINFO = "true"

When i deploy this to netlify i dont have .env
and the template.environment will prompt me for the value
Question that it overrides the build.environment variable for example the HUGO_BASEURL
this kind of variable has multiple areas where it is define
for example in the config.toml it is also define.

So I really wanna know who will be the one taking effect in there are multiple instances
and the sequence of overriding this variable ...

Any help would be great thanks

@erezrokah
Copy link
Contributor

I believe this was resolved in #1698.
Please comment if still relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants