Haskell Snap: Application Deployment and Time Dependencies

Clearing the Snap project source directory (removing dist) raises the following complaint:

A web handler threw an exception. Details:
GHC error: can't find a package database at dist/package.conf.inplace

So, if I clear the source directory, does it stop working? Does this only happen if I compile the development flag?

This brings me to the issue of deploying snap apps. What do we actually rsync on the server and what are the time dependencies? I, the coach, do not want to install the entire haskell platform on the deployment server. All I need on the server is the project executable and static files such as * .tpl, * .css, etc. Is it correct?

I can see two ways to deploy the application: rsync executable and its dependencies, or create a binary tarball distribution and transfer it to the server. What is common practice?

What files do I need to include in a binary tarball or rsync script to satisfy all dependencies at runtime?

thank

+5
source share
1 answer

Firstly, yes, it's just the result of using development mode. It uses all kinds of artifacts from your compilation environment. (This is the only way to make sure that it correctly duplicates your compilation environment during a dynamic reboot.) If you delete them, it will stop working.

- , . GHC . , libc. , linux, - libgmp. , - FFI, , , libs .

+3

All Articles