ihp.dockerfile 430 B

12345678910111213141516171819202122
  1. FROM nixos/nix
  2. COPY ./src /ihp
  3. WORKDIR /ihp
  4. # Add build dependencies
  5. RUN nix-env -i cachix
  6. RUN cachix use digitallyinduced
  7. # Warmup docker build cache
  8. RUN nix-shell -j auto --cores 0 --command "echo ok"
  9. # Build
  10. RUN nix-build
  11. # Setup
  12. ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world
  13. ENV PORT=8080
  14. EXPOSE 8080
  15. # Run
  16. CMD ./result/bin/RunProdServer +RTS -A32m -N$(nproc) -qn2 -M2G -RTS