[Haskell-cafe] Best deployment method for Hakyll websites (with Stack)?

Kyle Marek-Spartz kyle.marek.spartz at gmail.com
Thu Sep 10 15:48:09 UTC 2015

Does the web server *need* to be able to compile the website? Building
and serving a static site are separate concerns.

I build my Hakyll sites locally (and just switched some of them to
stack), and deploy just the _site directory to a static content server.

I wrote my own tool to do this with Amazon S3, but you could probably
rsync or scp the files to a public directory on your CentOS web
server. That's what the Hakyll docs suggest:


My site.hs:


The tool I wrote:


A comparable service that hosts static content:


Nicola Gigante writes:

> Hello,
> Note, this is not a Hakyll question, after all.
> I’m trying to host a hakyll website on a CentOS 7 server.
> I want to replicate the setup I had with the previous site, made
> with Jekyll: at each push on the git repository (hosted on the same
> server), the branch is recompiled and deployed to the web server.
> I already have the git hooks in place etc… The problem is how to
> manage the installation of ghc, hakyll, and their dependencies.
> I really really wish to have a clean solution. I really like stack, but
> its “per-user” directories make me wonder. The site compilation has
> to be performed by the git user account, which does not have an
> home directory. Can I setup a stack installation of a set of packages
> and then point stack to use that and only that?
> Also, how about the integration with docker? Is it really so painless as
> it is advertised? If I’ve understood correctly, I could install the
> docker image with stackage packages already installed, and tell stack
> to use that image with docker, having the site compilation sandboxed.
> Is it feasible?
> Thank you for any advice,
> Nicola
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Kyle Marek-Spartz

More information about the Haskell-Cafe mailing list