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:
- One for DRF and Django
- One for your Database layer (
Postgres
) for instance. - And one for your
CDN
.
Needless to say, you could containerize your webserver separately as well.