Deploying Haskell web application to low

I'm looking for a way to deploy a Haskell web application on a low-spec toy server. The server specs:

  • OS: debian stable (squeeze) i386
  • CPU: 1 GHz Pentium IV
  • RAM: 512 MB
  • Storage: 512 MB compact flash (mounted on /var ), 4 GB USB compact flash (mounted on / )
  • The server runs fine, it doesn't see much traffic (it's mainly used by myself, friends and family members), and I can afford to run it from my living room because it's completely silent and draw very little power (around 10 W idle, 40 W peak).

    Quite obviously, I would like to avoid installing the entire Haskell platform and compile on the server - I'd run out of disk space fairly quickly, and compilation is bound to take ages due to slow storage. I can't just deploy binaries from my development machine though, because that one runs debian testing amd64, so the binaries won't be compatible. My ideas so far:

  • install a VM with debian/i386 to build on
  • figure out a way to build i386 binaries on amd64
  • compile to C on the development machine, copy C sources to server, finish build there (installing gcc or clang on the server is probably acceptable)
  • other ideas?
  • Which one sounds the most promising? Are option 2 and 3 even possible?

    Also, I'm a bit concerned about libraries; the application depends on a few system libraries such as libcairo; installing them on the server is not a problem, but I wonder whether, especially for option 2, this would work (library versions etc.)


    Not tried with haskell, but with similar requirements in the past I've found it simplest to just set up a vm with the same version of debian as the target system. Means you don't need to worry about library versioning etc.

    链接地址: http://www.djcxy.com/p/10990.html

    上一篇: Ember.js数据关联不保存

    下一篇: 将Haskell Web应用程序部署到较低