How can I have a flex image pull the repo and rebuild, without wiping the database in the process?
I’ve tried binding the databasevolume to a local path, which mostly works - when I do a
docker-compose down -v, the database isn’t erased, which is half of the goal
But when I try to compose it back up, it fails during setup because the table already exists. (
CREATE TABLE ccda_field_mapping fails)
I can’t find where this comes from, or I’d try to add a conditional there. There are two instances of
CREATE TABLE ccda_field_mapping in the source, but one checks if it exists first, and the other drops the table first, so I suppose whatever’s causing this is neither of those.
Alternatively, if there’s a docker command to just pull the git repo and rebuild without dropping the database, that would work too. The given command wipes the database:
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools dev-reset-install'
And I’m unsure if it actually pulls the repo down again. The non-reinstall reset command also wipes the db, and both throw errors if not on easy-development. Though they do seem to work, it just has to be composed down and back up again (and, of course, wipes the db)
I have used development-easy, which works, and I am now trying to update an existing installation to the new changes
I could always take a snapshot, export it, reinstall everything, then import it - but I figure there must be an easier way to do this? And it sounds very risky; someone could easily forget to make a snapshot before updating