Okay, finally, after much effort, I was able to create an AWS OpenEMR Standard Edition v5.0.2p5 test system with my production database to try out the upgrade to v6.0.0 with docker-compose. I skipped messing around with production TLS/SSL certificates for now and just used the default v5.0.2p5 TSL/SSL system certificate defaults.
To create the test system, I was able to use cloudformation to create the system. Then, I manually copied the tables over (since trying to migrate them all at once failed for various reasons). I copied the chart documents over as a group. I tested the test system to make sure it was working correctly.
I tried the ./docker-compose up -d
command at the EC2 instance (web server) /usr/ubuntu/ command line, but that failed. I couldn’t run the docker-compose initially because docker-compose was not installed (command not recognized), so I installed it.
sudo apt install docker-compose
Next, duplicity backup failed … not the main concern here … just a note.
I had to create my own docker-compose.yml file from the message above
version: '3.1'
services:
openemr:
restart: always
image: openemr/openemr:6.0.0
ports:
- 80:80
- 443:443
volumes:
- logvolume01:/var/log
- sitevolume:/var/www/localhost/htdocs/openemr/sites
environment:
MYSQL_HOST: 'xxxxxxxxx.yyyyyyyyyy.us-east-1.rds.amazonaws.com'
MYSQL_ROOT_USER: openemr
MYSQL_ROOT_PASS: 'zzzzzzzzzz'
MYSQL_USER: openemr
MYSQL_PASS: 'zzzzzzzzzzzzz'
OE_USER: admin
OE_PASS: 'zzzzzzzzzzzz'
volumes:
logvolume01: {}
sitevolume: {}
Stored this in a docker-compose.yml file and copied it to the /root/openemr-devops/packages/lightsail/ directory
Next, I created an upgrade shell-script that I called upgrade.sh and gave execute permissions.
#!/bin/sh
# pull in 6.0.0 container
cd /root/openemr-devops/packages/lightsail
sed -i 's/5.0.2/6.0.0/' docker-compose.yml
docker-compose up -d
Then, I executed the script with sudo:
sudo ./upgrade.sh
This failed because the .yml script version was not supported.
Thus, I changed the version: '2'
to a supported version.
Here is the output (without the dynamic progress bars):
Creating network "lightsail_default" with the default driver
Creating volume "lightsail_sitevolume" with default driver
Creating volume "lightsail_logvolume01" with default driver
Pulling openemr (openemr/openemr:6.0.0)...
6.0.0: Pulling from openemr/openemr
801bfaa63ef2: Pull complete
c0fca5602b80: Pull complete
16ae7646d015: Pull complete
25745d6986aa: Pull complete
287024c5c48f: Pull complete
7748783f7444: Pull complete
a738d3d8c0bd: Pull complete
fbd98a41f2ba: Pull complete
617f72cc72f3: Pull complete
0edf1a638799: Pull complete
f77ec4b287c9: Pull complete
161d4566e8be: Pull complete
d484f49c1af7: Pull complete
f07d96935550: Pull complete
e3361e0f055d: Pull complete
371e6fb1a227: Pull complete
5020cb166b70: Pull complete
Digest: sha256:12e3549a52df9240e8c0a0603ed3070aa482e05f6806caf2549a20982df6c000
Status: Downloaded newer image for openemr/openemr:6.0.0
Creating lightsail_openemr_1
ERROR: for openemr Cannot start service openemr: driver failed programming external connectivity on endpoint lightsail_openemr_1 (5d29edb80ff448040b7e1a4fc8448766bc7f5dc475c786f47aa561c23a80e76c): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
Next, sudo reboot the instance for what it’s worth.
When I check the version, it is still v5.0.2p5 – the upgrade to 6.0.0 failed.
Any help getting this upgrade process to work would be appreciated.