I want to use docker to package my Django project, and then use docker-compose for service orchestration to run the database needed by the Django project. Suppose the content in docker-compose.yml is as follows:
version: "3"
services:
web:
image: my_project:latest
ports:
- 8000:8000
command: python3 manage.py runserver 0.0.0.0:8000
depends_on:
- postgres
postgres:
image: postgres
before running python3 manage.py runserver 0.0.0.0 code 8000
, I want to use python3 manage.py migrate
to Synchronize the structure of the database. Where should I add this order?