how do i keep orm in a distributed app?

I’d suggest you keep your DRF code with the rest of Django and containerize them together.

As for the ORM, what matters is the container for Postgres. You cannot tear apart, say, models into a separate container.

To summarize, you can have the following containers:

  1. One for DRF and Django
  2. One for your Database layer (Postgres) for instance.
  3. And one for your CDN.

Needless to say, you could containerize your webserver separately as well.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top