What I tested was reserved. For example, I created a new table in mysql mirror database.
docker-compose upLater, the previous table still exists.
But can’t understand, don’t
docker-compose upDidn’t you regenerate the instance of the mirror?
YML can actually generate only one instance per Docker-Compose? To reset, the previous instance must be manually deleted
docker-compose upThe existing container will be used preferentially instead of recreating the container.
The following methods can solve your problem:
docker-compose up -d --force-recreateUse
--force-recreateYou can force the container to be rebuilt (otherwise the container will only be rebuilt if the container configuration has changed)
docker-compose downStop all containers and delete the containers (so that they can be used next time
docker-compose upWhen it will be a new container)