Find the Document Root path.
cat /etc/apache2/sites-enabled/<nom-web>.conf | grep Document |
When you know which directory is the data located in, you have to copy them to the NFS mounting point.
scp -rp DocumentRoot_path/* your_user@server_name.s.upf.edu:/mnt/vmdata/research_group/project_name/html |
Copy the .htaccess file:
scp -rp DocumentRoot_path/.htaccess your_user@server_name.s.upf.edu:/mnt/vmdata/research_group/project_name/html |
The next step consists of knowing which database and credentials are used by Drupal. settings.php file provides this information:
cat <DocumentRoot>/sites/default/settings.php |
$databases = array ( |
Then, export the database content with "mysqldump" command.
mysqldump -u user -p database_name > DatabaseDump.sql |
Finally, copy the .sql file inside the project name folder of the NFS mounting point. Never copy it inside the mysql folder if you have not run the mysql container.
scp -rp DatabaseDump.sql your_user@server.s.upf.edu:/mnt/vmdata/research_group/project_name |
First of all, you will need to obtain the Wordpress version and MySQL version numbers.
<DocumentRoot>/wp-includes/version.php mysql -V |
Create the stack following these steps.
After that, configure yor Compose file. You need to create two services: HTML and MySQL.
Here, you have the Drupal template. Since it is a .yml file extension, be careful with indents if you copy-paste some parts.
Modify the settings.php file. Change 'localhost' to 'db':
$databases = array ( |
Move the DatabaseDump.sql inside mysql folder when its container is running and all configuration files created.
mv DatabaseDump.sql mysql/DatabaseDump.sql |
Access to Console and export the database.
mysql -u root -p database_name < /var/lib/mysql/DatabaseDump.sql |
Test your application connecting to docker.sb.upf.edu:XXXX, where XXXX is the number port given to you in the CAU.
If everything works fine, we will change the load balancer configuration to point to this port and all deployed docker servers.