{"action":"created","issue":{"url":"https://api.github.com/repos/projectkudu/kudu/issues/1781","labels_url":"https://api.github.com/repos/projectkudu/kudu/issues/1781/labels{/name}","comments_url":"https://api.github.com/repos/projectkudu/kudu/issues/1781/comments","events_url":"https://api.github.com/repos/projectkudu/kudu/issues/1781/events","html_url":"https://github.com/projectkudu/kudu/issues/1781","id":114248220,"number":1781,"title":"Dont copy web.config in sync","user":{"login":"mikkelhm","id":4194964,"avatar_url":"https://avatars.githubusercontent.com/u/4194964?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkelhm","html_url":"https://github.com/mikkelhm","followers_url":"https://api.github.com/users/mikkelhm/followers","following_url":"https://api.github.com/users/mikkelhm/following{/other_user}","gists_url":"https://api.github.com/users/mikkelhm/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkelhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkelhm/subscriptions","organizations_url":"https://api.github.com/users/mikkelhm/orgs","repos_url":"https://api.github.com/users/mikkelhm/repos","events_url":"https://api.github.com/users/mikkelhm/events{/privacy}","received_events_url":"https://api.github.com/users/mikkelhm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-30T10:59:14Z","updated_at":"2015-10-30T12:50:14Z","closed_at":"2015-10-30T12:47:14Z","body":"Hi Kudu team\r\n\r\nThis is more a question than an issue. \r\n\r\nWe are using Kudu on our installation of Azure Pack, meaning that all sites that are created gets kudu attached. We would love to do stuff to the default deploy script for the sites that are created. \r\nFrom the documentation, i see that this can be done pr. site, my modifying the deploy.cmd file, and we have this working. The issue is that we now have to change the deploy.cmd file for each site(currently ~600) in the installation, and do it everytime we create a new site. \r\nWe customize something globally for each site, these are the app settings like `POST_DEPLOYMENT_ACTIONS_DIR`, `SCM_USE_LIBGIT2SHARP_REPOSITORY` and `SCM_TOUCH_WEBCONFIG_AFTER_DEPLOYMENT` but i havn't had luck changing or setting which deployment script should be used globally.\r\nThe two solutions i see is possible right now is \r\n- 1. modify deploy.cmd for each site\r\n- 2. modify the .deployment file to have command = _global position_ on each site\r\n\r\nBoth solutions include changing something that is site specific rather than global.\r\n\r\n__The solution we are trying to do is:__\r\nWhen a user changes some files in their repositories, KuduSync copies all changed files to the webroot. In our post deployment actions dir, we have a tool that does a web.config transform, to ensure that certain configurations gets added to the web.config. The \"problem\" with this approach is that the web.config now looks different for KuduSync, and therefore copies web.config next time it syncs. This means that no matter what files get changed in the repository, web.config gets transferred to the webroot, thous restarting the app.\r\n\r\nThe solution that we have come up with is changing the deploy.cmd file, and tell KuduSync to ignore the web.config. In our post deployment tool, we then to the web.config transform to a temp dir, and overwrites the web.config in the webroot, if they are different. It is working, but includes changing the deploy.cmd for every site.\r\n\r\nAny advice on this, or are we having a wrong approach for the issues?"},"comment":{"url":"https://api.github.com/repos/projectkudu/kudu/issues/comments/152515134","html_url":"https://github.com/projectkudu/kudu/issues/1781#issuecomment-152515134","issue_url":"https://api.github.com/repos/projectkudu/kudu/issues/1781","id":152515134,"user":{"login":"mikkelhm","id":4194964,"avatar_url":"https://avatars.githubusercontent.com/u/4194964?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkelhm","html_url":"https://github.com/mikkelhm","followers_url":"https://api.github.com/users/mikkelhm/followers","following_url":"https://api.github.com/users/mikkelhm/following{/other_user}","gists_url":"https://api.github.com/users/mikkelhm/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkelhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkelhm/subscriptions","organizations_url":"https://api.github.com/users/mikkelhm/orgs","repos_url":"https://api.github.com/users/mikkelhm/repos","events_url":"https://api.github.com/users/mikkelhm/events{/privacy}","received_events_url":"https://api.github.com/users/mikkelhm/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T12:50:14Z","updated_at":"2015-10-30T12:50:14Z","body":"No not exactly we implemented the newest Kudu, exatly to get that functionality, as we thought that was the trouble maker, it was ALSO causing the app restart, but our own transform in the end is the real culpit. \r\nThe issue is that we actualy need to inject some things in the web.config that is in the webroot, and currently it is done with web.config transforms. This results in the fine in the webroot beeing different than the one in the repository, thus KuduSync will copy again next time"}}