DEV Community

Discussion on: How do you setup local development database?

Collapse
 
buphmin profile image
buphmin

I like to use docker and a sql script for populating minimum dev data when possible. This can help prevent the "works on my machine" part by making sure everyone is using the same config across all environments.

For acceptance testing I use Codeception with gherkin to populate tables with testable values as needed.

You can take a look at my Symfony 4 demo repo for an idea of how to configure docker with a sql script to populate the DB. The DockerFile-db imports the dump.sql stored in the dockerConfig dir. The dump.sql contains the schema and inserts some data.

Collapse
 
blouzada profile image
Bruno Louzada

Wow sounds like a really good strategy I will take a look thank you