Haskell Yesod stack build runnable file

148 views Asked by At

I was looking for ways to deploy my Yesod project, and while reading some tutorials (Keter and Docker way), I realised that, stack build generates a runnable file which can be executed directly and listen for requests, is there any reason I should not use it in production in the beginning? I think it would be great if it was that simple... I would run it in a Debian server hosted on Google Cloud.

1

There are 1 answers

0
ErikR On BEST ANSWER

It should work (assuming architectures are the same.)

Things to check:

  1. Run ldd (otool -L on OS X) on the binary to see what shared libraries it references.
  2. Make sure you've copied over any templates and data files.
  3. Have a look at the section on keter in the Yesod book: http://www.yesodweb.com/book/deploying-your-webapp

The section on keter is valuable not only for info on keter but also because it talks about the files you need to deploy for a Yesod app.