Skip to content

Commit

Permalink
Run stack build with only one job
Browse files Browse the repository at this point in the history
It seems that certain haskell packages (in my case, haskell-src-exts,)
take up so much memory that docker dies trying to run them, so we make
it run with one job, vs. as many as possible in parallel.

See:

* https://github.com/facebook/duckling/blob/7889f396f324028075d39e5003f1083ad05d68f3/Dockerfile
* facebook/duckling#203
* wireapp/wire-server#562
* https://stackoverflow.com/questions/56496852/problem-building-a-docker-container-with-haskell-stack-how-can-i-ensure-that-ha
  • Loading branch information
lfborjas committed Oct 18, 2020
1 parent 4a4f9ab commit 73a8b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /opt/freenatalchart

# Install dependencies and move binary to `/bin`
RUN stack --system-ghc build -j1 servant diagrams
RUN stack --system-ghc build
RUN stack --system-ghc build -j1
RUN stack --local-bin-path /opt/freenatalchart/bin install

# Add user and setup path (for local testing, ignored by Heroku)
Expand Down

0 comments on commit 73a8b35

Please sign in to comment.