diff --git a/docker/README.md b/docker/README.md index 6ba1259..91eec21 100644 --- a/docker/README.md +++ b/docker/README.md @@ -120,3 +120,18 @@ docker-compose --env-file docker/environments/local.env -f docker/docker-compose // Check if index.php exists docker-compose --env-file docker/environments/local.env -f docker/docker-compose.yml exec nginx ls /var/www/html/public ``` + +### Importing existing database data +``` +// Copy .sql file for import to the container +// docker cp /.sql :./.sql +docker cp docker/volumes/mysql/file.sql mysql:file.sql + +// Then login to mysql +// docker exec -it mysql -u -p +docker exec -it mysql mysql -udbUserDev -pdbUserDev123 + +// Inside mysql, import the data +// source .sql +mysql> source file.sql +``` \ No newline at end of file