Answer the question
In order to leave comments, you need to log in
Organization of work with the database in docker?
There is a project working with a productive database. (bundle of Zend FW & Doctrine ORM)
As such, there is no test database.
It is necessary that the developer, when cloning the project repository to himself, launching the docker container, immediately has a failed test database (clone of the productive one). How to lay the formation of a test database in the build of the docker container and organize work with Doctrine orm there right away?
Answer the question
In order to leave comments, you need to log in
1. Dump the database into a container (you shouldn't copy it, because due to the layering of images, the container may turn out to be too bold).
2. When building, start filling the database ( pg_restore database.dump
/ mysql < database.sql
)
And also, if you work with Doctrine, you can create a database using ORM tools and fill it with fixtures .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question