There are multiple containers using data from the same indexes in Elasticsearch and Mongodb databases:
app
is a python app that serves data via APItasks
is a python + celery app that perform periodical updates, cleaning, etc. on the same databackend
is a python app that use the same data for business-logic
The definitions of the models are elasticsearch-dsl
and mongoengine
Documents with minimum code for validators. Currently they live in a separate repo on gitub, which is included in requirements.txt
of each app, and used when running containers via docker-compose
(in dev) or swarm
(in production)
While OK for production, this method is very inconvenient for developer, since after each change in any model description, a separate repo should be updated, and then those changes should be populated across all local apps.
Is there any other convenient method for sharing model definitions across multiple containers in the same project (without compromising security)?