warp-shared.dockerfile 835 B

123456789101112131415161718192021222324252627
  1. FROM haskell:8.6.3
  2. RUN apt-get update -yqq && apt-get install -yqq xz-utils make
  3. RUN apt-get install -yqq libpq-dev
  4. WORKDIR /app
  5. COPY stack.yaml ./
  6. COPY ./shared/tfb-types/tfb-types.cabal ./shared/tfb-types/
  7. COPY ./shared/tfb-hasql/tfb-hasql.cabal ./shared/tfb-hasql/
  8. COPY ./shared/tfb-mysql-haskell/tfb-mysql-haskell.cabal ./shared/tfb-mysql-haskell/
  9. COPY ./shared/tfb-postgres-wire/tfb-postgres-wire.cabal ./shared/tfb-postgres-wire/
  10. COPY ./warp-shared/warp-shared.cabal ./warp-shared/
  11. RUN stack setup
  12. RUN stack install --dependencies-only
  13. ADD ./shared ./shared
  14. ADD ./warp-shared ./warp-shared
  15. RUN stack build --pedantic --copy-bins
  16. RUN ln -s ~/.local/bin/warp-postgres-wire ~/.local/bin/warp
  17. ARG TFB_TEST_NAME
  18. ENV TFB_TEST_NAME=${TFB_TEST_NAME}
  19. EXPOSE 7041
  20. CMD stack exec $TFB_TEST_NAME -- tfb-database +RTS -A32m -N$(nproc)