Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McFateM/ffe775ef2fdeeccbf044767187adbd5e to your computer and use it in GitHub Desktop.
Save McFateM/ffe775ef2fdeeccbf044767187adbd5e to your computer and use it in GitHub Desktop.
Description:
------------
This line defines a Docker 'volume' that can be used to import an existing Islandora's Drupal database. Once a database has been imported the volume will persist and need not be imported again. Once your data is imported it is placed into the 'db_data' volume. See 1.2.7.2, https://gist.github.com/McFateM/089b18a1b2e5c1432751d481fd1b6112, for 'db_data' details.
Instructions:
-------------
Make sure the line in docker-compose.yml is initially NOT a comment.
Export your existing Islandora Drupal database. I did this using Drush from a terminal opened on my production Islandora server, like so:
cd /var/www/drupal7/sites/default
drush sql-dump > drupal.sql
Now, copy (or move) your dumped Drupal database to the ../mysql/data folder in your ISLE project on your host. My command was:
rsync -aurvi drupal.sql user@host:/home/user/Projects/Docker/dg_isle_docker/dg/mysql/data/
Use:
----
After you have successfully done a 'docker-compose up' command you may edit this line in your docker-compose.yml and comment it out by adding a hashtag at the start of the line like so:
# - ./dg/mysql/data:/sql_databases_for_import
Notes:
------
Ben's original comment... "I placed my sql.gz files in here and used phpmyadmin or mysql -uroot -p<MYSQL_ROOT_PASSWORD> <database> < drupal.sql"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment