[Haskell-cafe] Best deployment method for Hakyll websites (with Stack)?
Michael Snoyman
michael at snoyman.com
Thu Sep 10 14:46:23 UTC 2015
I'm not sure if it answers your question, but: stack's installation doesn't
have to be user-local, it just has to be somewhere that the user has write
access to. The default in $HOME/.stack, but this can be overridden by
setting the STACK_ROOT environment variable. So for example, this could
work:
sudo mkdir /opt/stack
sudo chown git /opt/stack
export STACK_ROOT=/opt/stack
stack build hakyll
Using Docker will mean that you get all of the Stackage packages available
without needing to compile them, and could be a great solution. Check out
the Wiki page for more information on getting started with it:
https://github.com/commercialhaskell/stack/wiki/Docker
On Thu, Sep 10, 2015 at 4:49 PM, Nicola Gigante <nicola.gigante at gmail.com>
wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150910/b4420b1d/attachment.html>
More information about the Haskell-Cafe
mailing list