开发者

How can I deploy ASP.NET (mvc) site using GIT and for ex. beanstalkapp.com via FTP?

The problem is, that when I com开发者_Go百科mit project directory, there is uploaded everything including source code.


Not really sure why you want to upload via FTP? You shouldn't commit your own compiled binaries to source control for deployment though.

You could take a look at AppHarbor, just push your code with git and it will be build and deployed automatically.

more about AppHarbor

Real alternatives to Windows Azure PaaS (web role)?


Does it matter? Since asp.net pages can be compiled on the server, having source files on the web server is sometimes normal so IIS knows not to allow access to them.

That said, uploading output binaries into source control is generally a bad idea - it is better to do the deployment from your build server.


Actually, this is kind of hard.

For months, I've tried to automatize our deployment, without absolute success. For my experience, I can see only way to do that:

Have a build server on your deployment machine (or same network)

A build server will pull out your code from repository, say, once per minute and will check for modifications. If there's modifications, it will execute the build scripts related to this project. I suggest you to use TeamCity, because it is very easy to use compared to CruiseControl (I'm not sure if you can use Git with TFS). You can program your build server for build your solution or project and after, you can execute an msbuild script to copy the files to the production folder (e.g: c:\inetpub\yourapp or \\my_server\inetpub\yourapp). You can use MSBuild's Copy Task to do that.

UPDATE 1: I didn't tried, but if helps, you can push to an FTP server using git-ftp

UPDATE 2: Seems that some guy did some workarounds and successfully deployed his app using git and FTP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜