I have a Yesod site and have created a handler for handling downloads and enforcing constraints.  My Yesod project directory has a subdirectory called downloads, and it contains files I want the user to be able to download if they are logged in.  The handler works great in my development and staging boxes, but breaks when I transfer to production.  I tracked the problem down to yesod keter not archiving the files when it builds its bundle.
How do I convince keter to include the directory?
                        
All the
yesod ketercommand does is create a.tar.gzcompressed archive file with the.keterextension containing the following subdirectories:config: an exact copy of the identically named directory in your source treedist: contains a subdirectorybincontaining your app's binarystatic: an exact copy of the identically named directory in your source treeNote that the path to your app's binary is set in
config/keter.ymlvia theexecsetting while the path to your static files is set via therootsetting. The exact set of files included by theyesod ketercommand is specified in thefindFilesfunction if you want to take a look at the source code.If you want to customize the contents of your
.keterfile it is probably most straightforward to write a shell script to create the archive. With this script you can add arbitrary extra directories to the archive.The bare minimum bash script you'd need to emulate the behaviour of
yesod keteris as follows:You can customize this however you want to produce the correct content. Adding
download/to the end of this command line should do the trick.