I have following service structure:
service1/
Dockerfile
manage.py
settings.py
..
service2/
Dockerfile
manage.py
settings.py
..
databasemodel/
Dockerfile
manage.py
settings.py
database/
models.py
Each service and database models has it's own git repository.
How do I share common django database model between them (both services connect to same database). I have implemented manual copying of "database" folder over to service1 and service2, but it feels wrong. I feel like implementing some anti-pattern.
I need setup for:
1) development on local machine (something that would bring up database and both services)
2) deployment so that dev-ops team can deploy each git repo to server
I am very inexperienced with Django and Python and Docker and Git, please do not assume that I know trivial truths. :)
EDIT: I am free to change this structure how I please, however solution should still have git-repo for each service and database models
Aucun commentaire:
Enregistrer un commentaire