From 99984d328e04735b8e745ff4deac72ef2ab3c848 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Fri, 6 Feb 2026 14:00:17 +0500 Subject: [PATCH] docs: add section on docker resource constraints Closes #4623. Signed-off-by: Taimoor Zaeem --- docs/explanations/install.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/explanations/install.rst b/docs/explanations/install.rst index 31f7b4134..30173e291 100644 --- a/docs/explanations/install.rst +++ b/docs/explanations/install.rst @@ -181,6 +181,23 @@ If you want to have a visual overview of your API in your browser you can add sw With this you can see the swagger-ui in your browser on port 8080. +.. _docker_cpu_contraint: + +Docker Resource Constraints +--------------------------- + +PostgREST does not support ``--cpus`` `constraint option `_. + +As a workaround, you may use the `GHC RTS `_ ``-N`` option. For instance, to limit it to 2 CPU cores, do: + +.. code:: + + # Set environment variable GHCRTS set to "-N2" + docker run --rm -p 3000:3000 \ + -e PGRST_DB_URI="postgres://app_user:password@10.0.0.10/postgres" \ + -e GHCRTS="-N2" + postgrest/postgrest + .. _build_source: Building from Source