A Django service with Postgres and MongoDB
- Why Multiple Database
different app use different database
example:
example_user for user data
example_app for application data
flowchart
django[["django"]]
db1[("postgres")]
db2[("mongodb")]
subgraph databases
direction TB
db1
db2
end
subgraph web
django
end
db1 <-.->|"ORM"|web
db2 <-.->|"ORM (Djongo)"|web
- build django image
make build-django-image
- start with docker-compose
docker-compose up -d
- migrate data
make migrate-all
django web: 0.0.0.0:8000
flowchart
dev("jupyterlab")
django[["django"]]
db1[("postgres")]
db2[("mongodb")]
subgraph databases
direction TB
db1
db2
end
subgraph web
django
end
db1 <-.->|"ORM"|web
db2 <-.->|"ORM (Djongo)"|web
dev -.->|"Django Kernel"|web
Jupyterlab with django kernel for develop and test
make run-jupyter-with-django
jupyterlab: 0.0.0.0:8888