supabase/postgres ? reverse-engineered prompt

Reverse engineered prompt

Build me a Supabase Postgres setup that feels ready to use out of the box.

I want a clean, reproducible PostgreSQL distribution with useful extensions preinstalled, so I can run Postgres locally or in Docker without spending time hunting down and compiling extras. It should support Postgres 15 and 17, with an option for OrioleDB 17 too, and it should be easy to build with Nix. Make sure I can run basic checks and tests, and that the images are usable for development as well as something close to production.

If possible, include the common extension stack people expect for search, geospatial, time series, security, JSON, and developer testing. I also want the Docker builds to work smoothly, including a single base image that can target different Postgres versions. If you need to look up current docs online for anything unclear, do that and keep the setup simple and practical.