|
@@ -4,11 +4,14 @@ COPY ./src /ihp
|
|
|
WORKDIR /ihp
|
|
|
|
|
|
# Add build dependencies
|
|
|
-RUN nix-env -i git cachix
|
|
|
+RUN nix-env -i cachix
|
|
|
RUN cachix use digitallyinduced
|
|
|
|
|
|
+# Warmup docker build cache
|
|
|
+RUN nix-shell -j auto --cores 0 --command "echo ok"
|
|
|
+
|
|
|
# Build
|
|
|
-RUN nix-shell -j auto --cores 0 --command "make build/bin/RunOptimizedProdServer"
|
|
|
+RUN nix-build
|
|
|
|
|
|
# Setup
|
|
|
ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world
|
|
@@ -16,4 +19,4 @@ ENV PORT=8080
|
|
|
EXPOSE 8080
|
|
|
|
|
|
# Run
|
|
|
-CMD nix-shell -j auto --cores 0 --command "./build/bin/RunOptimizedProdServer"
|
|
|
+CMD ./result/bin/RunProdServer +RTS -A32m -N$(nproc) -qn2 -M2G -RTS
|