eko / docker-symfony

Run a Symfony application using Docker & docker-compose
BSD Zero Clause License
1.29k stars 474 forks source link

How can I save all my data from one strating to another? #123

Closed Pum-purum closed 4 years ago

Pum-purum commented 4 years ago

Database is clear every time I launched docker :(

Coderberg commented 4 years ago

Андрей, try to add something like this:

volumes:
       - /mysql:/var/lib/mysql
Pum-purum commented 4 years ago

But what if i use Docker on Windows machine ?

eko commented 4 years ago

@Pum-purum @Coderberg is right, you can mount your data into a directory. It works both on Linux, MacOS and Windows, so you can specify a Windows directory, such as:

volumes:
       - C:\data\mysql:/var/lib/mysql

Please close this issue once it's OK for you.

Thank you