Skip to content

Instantly share code, notes, and snippets.

@Rizary
Created January 6, 2018 00:07
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 Rizary/35fd9e4d28ffd11d675237723d3ae0ee to your computer and use it in GitHub Desktop.
Save Rizary/35fd9e4d28ffd11d675237723d3ae0ee to your computer and use it in GitHub Desktop.
FROM haskell:8 as builder
WORKDIR /opt/server/hmb
RUN cabal update
RUN apt-get update && \
apt-get install -y postgresql-9.4 libpq-dev
ADD hackage-matrix-builder /opt/server/hmb
RUN cabal new-build -j1
RUN mkdir /opt/server/prod && \
cp ./dist-newstyle/build/x86_64-linux/ghc-8.2.1/hackage-matrix-builder3-0.3/c/matrix-controller/build/matrix-controller/matrix-controller /opt/server/prod/
RUN rm -rf /root/.cabal && rm -rf ./dist-newstyle
WORKDIR /opt/server/prod
COPY controller.cfg .
COPY hmb-entrypoint.sh .
RUN chmod +x hmb-entrypoint.sh
ADD hackage-matrix-builder/ui ui
EXPOSE 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment