Skip to content

Instantly share code, notes, and snippets.

@koriroys
Last active September 14, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koriroys/7194edcb70a6b7428c49 to your computer and use it in GitHub Desktop.
Save koriroys/7194edcb70a6b7428c49 to your computer and use it in GitHub Desktop.
Pandoc 1.15 on Heroku Cedar 14. regular lines are console commands. // lines are comments, just read those :)
// create a digital ocean ubuntu 14.04 droplet (matches heroku ubuntu version)
// pick the 2GB (or more) RAM option or cabal update will fail
// ssh into it:
ssh root@<ip_address>
// enter root password
// prompted to change password, follow instructions
// update
apt-get update
// install haskell stuff
apt-get install haskell-platform
// update haskell stuff
cabal update
// library pandoc needs to make a standalone binary
cabal install hsb2hs
// next line is so that hsb2hs gets picked up properly
export PATH=$PATH:/root/.cabal/bin
// make the pandoc standalone binary
cabal install pandoc --flags="embed_data_files" pandoc
// vendor binaries go in the bin folder on heroku, so set up the archive properly
mkdir -p bin
cp .cabal/bin/pandoc bin/
// create the archive
tar -zcvf pandoc-1.15.0.6-ubuntu-14.04.tar.gz bin/
// log out of digital ocean
exit
// on local system
scp root@<ip_address>
// type in password
// copy archive to your computer
scp root@<ip_address>:pandoc-1.15.0.6-ubuntu-14.04.tar.gz ~/Downloads
// upload archive to s3
// make sure to set permissions to public, or you'll get a weird heroku error
// in your .vendor_urls file, add the url to your s3 hosted pandoc, or you can just use ours:
// https://s3-eu-west-1.amazonaws.com/shazino/pandoc-1.15.0.6-ubuntu-14.04.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment