Upgrading Docker from 6.0.0 to 7.0.0

Is automatic upgrading of OpenEMR Docker installation supported when upgrading from 6.0.0 to 7.0.0?

Many thanks.

hi @rdh61 ,
Yes, it will. Check out the very bottom paragraph at this page Docker Hub for details on the auto ugprade.

2 Likes

Thank you @brady.miller

“This will only work if you have set a shared volume for the /var/www/localhost/htdocs/openemr/sites directory (it will not work if either you didn’t set a shared volume or you set the shared volume to be the entire /var/www/localhost/htdocs/openemr directory).”

What does “set a shared volume” mean? To my knowledge I have not done that.

Can see it in the docker-compose.yml script (the aws packages and the example docker-compose.yml scripts create this shared volume). This line is an example from the example docker-compose.yml script that shows the shared volume: openemr-700-docker-example-docker-compose.yml · GitHub

Do I have to restore my backup after the upgrade or will my data be inserted there automatically?

Because after the upgrade when I search for a patient by surname I get this error message:

DataTables warning: table id=pt_table - Invalid JSON response. For more information about this error, please see 1. Warning: Invalid JSON response

no need to restore, what does your patient list columns show?

@stephenwaite

Like this…

I have found out that this error only happens when I use “Search with any demographics” at top right, but if I go to Patient → Search/New and search with that window, I get a result.

That solves my immediate problem, but perhaps it is good for you to know about this gremlin.

the upcoming patch will fix this

I require assistance with a related matter. I installed OpenEMR 6.0 Docker on Linux without a shared volume for the website. However, I do have a shared volume for the MySQL Docker. I now wish to upgrade to OpenEMR 7.0.3 and incorporate a shared volume. Additionally, I am aware that OpenEMR 6 is utilizing MySQL, whereas version 7 is using MariaDB. what are the steps to accomplish the migration ?

hi @gwmsist , What does your docker-compose.yml script look like? (ensure to leave out any credentials if show the script)

Hello Brady,

I want to express my gratitude for your willingness to assist – it’s truly appreciated. Initially, when installing Docker 6.0, I did not use a composer file. Instead, I obtained an image from hub.docker.com and installed it using the following command: “docker run --name EMR -P 443:443 --ip 172.17.0.3 -d openemr:v3.” Additionally, I have another container for MySQL, utilized by the OpenEMR mentioned above, connected to the IP 172.17.0.4.

Recently, I opted to use the compose file available at https://github.com/openemr/openemr-devops/tree/master/docker/openemr/7.0.2/#openemr-official-docker-image to create OpenEMR 7.02 and the associated database. Upon successfully running the compose file, I could access the new system.

However, when attempting to migrate the SQL dump file for the entire database from OpenEMR 6.0 to the new server and restoring it, I encountered an issue. After successfully restoring the database, I am no longer able to access the system. Instead, I am presented with a blank page and don’t even see the login screen.

Your guidance on resolving this matter would be greatly appreciated.

Thank you,

@gwmsist
Have you read the instructions at the bottom of the page you poted to upgrade your docker?

  • Automatic upgrading of OpenEMR is supported when upgrade from 5.0.1 to 5.0.2+ (note this is not supported in the flex* series). In your docker-compose.yml file, you can basically change the 5.0.1 or 5.0.2 or 6.0.0 or 6.1.0 to 7.0.0 image and then do a docker-compose up. This will only work if you have set a shared volume for the /var/www/localhost/htdocs/openemr/sites directory (it will not work if either you didn’t set a shared volume or you set the shared volume to be the entire /var/www/localhost/htdocs/openemr directory). Before you do this, recommend backing everything up.

Dear Sherwin
Certainly, I have indeed perused the information, and it is not relevant to my existing setup and the objectives I am attempting to achieve, as elucidated in my initial message. Upgrading through the compose file is not feasible for me as I haven’t set up the system to utilize a shared volume for the site directory. Furthermore, when I transfer the database to a freshly installed instance of OpenEMR 7.2, I encounter a blank page. I would appreciate your guidance on this matter.

@gwmsist
Sounds like your file encryption keys do not match with your database keys.
Ensure the same sites directory that the database was generated with is moved to your new instance.
Mainly the two keys at sites/default/documents/logs_and_misc/methods/sixa and sites/default/documents/logs_and_misc/methods/sixb must follow the database!

If you can access you php error log you may see some errors that will help.

It’s important to keep the keys together otherwise any of your passwords (other than user passwords) or other database stored encrypted items will no longer be valid. The above keys are not used to encrypted documents as those are different keys.

Hi Jerry
Thank you very much for your prompt response. I did transfer both files with the database and I did it again after I saw your message with no luck. However, your message gave me an idea to solve the issue. I actually deleted both files and this time it worked and everything showing as expected. I am going to document and share the steps I use to migrate my system from non-share volume docker to new server with latest release in docker with shared volume. Thank you everyone for helping.

1 Like

Problem with deleting the keys is that any encrypted items in database using those keys will have to be resaved. e.g. Notification SMPT passwords and others beside user passwords.

This is why I avoid having folks delete those keys to make login work because two new keys get created causing never going back to original keys.
If the keys you transfer didn’t work then they weren’t the original keys.

So now you know ensure to visit various encrpted items in your config and reenter so they will work for your users.

Just think about all you learned from this little adventure.:slight_smile:
And appreciate if you document for other community members…

Hello Jerry,

I appreciate the information you provided. I’ve attempted to transfer both files from my existing server to the new server multiple times, and each time, I encountered the same problem. Although I haven’t attempted to log in with a different user, I did successfully log in with my account without any difficulties. I want to ensure a proper resolution to avoid any future issues. What would you recommend to address the problem with these files? Your assistance is greatly valued. Thank you.

The only reason I can think of is that the file permissions didn’t allow reading the files you transferred.
Otherwise, I’m befuddled unless another issue is involved which accessing the php error log may help.