I have an architectural question: We have a Django project made of multiple apps. There is a core app that holds the main models used for the other sets of apps. Then, we have a couple apps for user facing APIs. Lastly, we have some internal apps and tools used by developers only that are accessible in Admin UI as extended features.
Our deployment process is very monolithic. We use Kubernetes and we deploy the whole project as a whole. Meaning that if we only had changes in an internal app and we need that in production, we will build a new Docker image and deploy a new release with a new version tag incremented.
I'm not a big fan of this because change in internal tools shouldn't create a new release of the user facing applications.
I have been wondering if there is a way to split those deployments (maybe make them into a microservice architecture?). So we could deploy the user facing applications separate from the internal tools. I know I could build separate images, tags and everything for parts of the project but I'm not sure how they could communicate between each other if internal_app_1
depends on the models of core
app and potentially the settings.py
and manage.py
file as well.
Also because in Kubernetes, having to separate applications would mean to separate deployments with two servers running, so this means two separate Django projects isolated from each other but using the same database.
Has anyone worked with something similar or would like to suggest an alternative, if there's any?
Below is a tree example of how our project is structured at the moment:
├── core
| ├── models.py
| ├── views.py
| └── urls.py
├── userapi_1
| ├── views.py
| └── urls.py
├── userapi_2
| ├── views.py
| └── urls.py
├── insternal_app_1
| ├── templates
| | └── ...
| ├── models.py
| ├── views.py
| └── urls.py
├── manage.py
├── settings.py
└── Dockerfiles
├── Dockerfile.core
└── Dockerfile.internal_app_1