Support to read configuration from netlify-config.json (generate in ng add, and mentioned in .gitignore)
ngdevelop-tech opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
I have tested netlify-builder using environment variable configuration, and it is working fine.
This will work for the single application, but how it will work for multiple applications ?,
Though NETLIFY_TOKEN
can be common for all sites, but site id will be different for each site. So whenever I want to deploy for particular site, I need to set NETLIFY_API_ID
environment variable with Site ID of that application. which is not a proper solution.
Describe the solution you'd like
Solution 1 : I am not sure whether sharing site id is secure or not ? if sharing site id is secure then we can add site id in angular.json
directly and NETLIFY_TOKEN
in environment variable - For this solution, development is not required. this will work with current builder.
Solution 2: During ng add
we can create separate netlify-config.json
file, put netlify-builder configuration there, and add it in .gitignore
. So it will not get committed in git and we can access parameters from this file (the way it is implemented in angularfire2 deploy)
Additional context
If we are reading configuration from environment variable, it should not ask for site id and netlify token id, in ng add
,
For this either we can ask initially whether user want to configure it through environment variable or he want to add it now in angular.json
( or in netlify-config.json
if this feature is implemented.)
https://www.netlify.com/blog/2019/09/17/using-the-angular-builder-for-netlify/
As per Tara from Netlify team it's fine to have SIteID in angular.json
https://www.netlify.com/blog/2019/09/17/using-the-angular-builder-for-netlify/
As per Tara from Netlify team it's fine to have SIteID in angular.json
Thanks @santoshyadav198613 for info,
If it is safe to share Site ID, then changes are not required.
closing this as not needed.