How to set up an in-project PostgreSQL database for a Django trading app?

I’m working on a Django-based trading platform project. Currently, my setup connects to a hosted PostgreSQL instance (Render). My client has now requested an “in-project PostgreSQL database”. From my understanding, this means they want the database to run locally within the project environment (rather than relying on an external hosted DB).

Question: What is the best practice for including PostgreSQL directly with the project? Should I:

  • Use Docker/Docker Compose to spin up PostgreSQL alongside the Django app,
  • Include migrations and a seed dump in the repo so the DB can be created on any machine, or
  • Is there another recommended approach?

I want the project to be portable so the client (or other developers) can run it without needing to separately set up PostgreSQL.

Вернуться на верх