Anything specific? What kind of environments are you deploying in?
Anything specific? What kind of environments are you deploying in?
When I'm working with production environments, I build the Haskell executable locally and add that (statically linked) program to the Dockerfile. That should tremendously speed things up. The caveat is that your local and production architecture are the same. I find deploying the static executable much quicker and more simple. You aren't doing it wrong, just thought I would my own preferences.
Some environments like Elastic Beanstalk have timeouts that will kill the build if it doesn't build quickly enough (a problem on smaller VMs). Another issue is potential RAM needed by GHC.
Keep in mind that Haskell executables statically link Haskell libraries and dynamically link system libs (by default). You can find your system library dependencies by running:
$ ldd dist/build/serials/serials
[...]I really recommend you first read about nix with http://lethalman.blogspot.com/feeds/posts/default/-/nixpills . Once you've done that, the simple instructions at http://wiki.ocharles.org.uk/Nix should get you going.
You can try to skip to the wiki page, but in the likely case something doesn't go quite right, it will be hard to debug without a broader knowledge of Nix.
I'll admit Nix's has quite the learning curve, and I was more tempted to sneak around its uncompromising rigidity than when learning Haskell. But the bitter pill is worth it.
|nix keywords| << |docker keywords| << |nix idioms|