asp.net - Automatic edit a config file with password after deployment from github to azure -
i have asp.net web application on azure, continous integration github. works good, , have managed move of passwords , connectionstrings off source , application settings. there 1 file cannot manage solve how provide connectionstring without having in source. file filesystemproviders.config looks like:
<provider alias="media" type="our.umbraco.filesystemproviders.azure.azureblobfilesystem, our.umbraco.filesystemproviders.azure"> <parameters> <add key="connectionstring" value="**secret1**"/>
is there anyway make script running after each deployment replaces **secret1** connectionstring automatically? or other way around?
i found solution this, posting in case wondering same. kudu service has post deployment action hooks. after creating new directory in "d:\home\site\deployments\tools\" named "postdeploymentactions", put 2 files directory, , script copies connectionstrings right place.
copyfiles.bat
copy d:\home\site\deployments\tools\postdeploymentactions\hiddenfilesystemproviders.config d:\home\site\wwwroot\config\filesystemproviders.config
hiddenfilesystemproviders.config config file private connectionstring.
the scripts runs after each deployment github azure.
Comments
Post a Comment