部署使用Snap Framework的Haskell代码 [英] Deploy Haskell code that uses the Snap Framework

查看:213
本文介绍了部署使用Snap Framework的Haskell代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果在服务器上编译失败,那么我想中止部署,并且如果成功了,我希望它能够启动快照服务器并启动新版本。



我知道有很多方法。从rsync到git-hooks(git pull是一场噩梦)。但我希望听到您的经验。

解决方案

在我工作的地方,我们使用Happstack并在Ubuntu linux上部署。实际上,我们将Web应用程序和所有依赖关系进行debian化,然后在自动构建器中构建它们。



要实际安装在服务器上,我们只需运行 apt-get update&& apt-get install webapp-production



这个系统的优点是它可以让所有的开发人员轻松开发相同版本的依赖关系。而且您知道所有源代码都已正确检入,并且可以在任何地方重建......而不仅仅是在一台特定的机器上。此外,它还提供了一种机制,可以在需要时从hackage制作补丁。



缺点是apt-get和cabal-install不能很好地兼容。您必须通过apt-get来构建所有内容,或者通过cabal-install来完成所有任务。


What's your experience with deploying Haskell code for production in Snap in a stable fashion?

If the compilation fails on the server then I would like to abort the deployment and if it succeeds then I would like it to turn of the snap-server and start the new version instead.

I know there are plenty of ways. Everything from rsync to git-hooks (git pull was a nightmare). But I would like to hear your experiences.

解决方案

Where I work, we use Happstack and deploy on Ubuntu linux. We actually debianize the web app and all the dependencies, and then build them in the autobuilder.

To actually install on the server, we just run apt-get update && apt-get install webapp-production

The advantage of this system is that it makes it easy for all developers to develop against the same version of the dependencies. And you know that all the source code is checked in properly and can be rebuilt anywhere .. not just on one particular machine. Additionally, it provides a mechanism to make patches to libraries from hackage when needed.

The downside is that apt-get and cabal-install do not get along well. You either have to build everything via apt-get or do everything via cabal-install.

这篇关于部署使用Snap Framework的Haskell代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆