About a week ago I moved my host based SuiteCRM installation to a bitnami docker based install.
What I did:
1. I created an empty database within a MySQL docker setup
2. I ran "docker run ... bitnami/suitecrm:latest" with the required options, such as db login and password, to fire up the docker instance using the pre-created database. This step also creates the required persistant volumes on my hard drive, containing the php, conf, suitecrm folders
3. I copied the suitecrm folder from the host based installation into the mentioned persistant folder suitecrm/suitecrm/
4. I exported the database and imported it into the new db instance (docker)
5. I took over the suitecrm/suitecrm/conf folder from the fresh bitnami install because it was missing after my copy job from the old server. I also took over another hidden file I cannot remember
Following these steps, I was able to access the new docker based SuiteCRM install and could simply log in. Tested some things like access to pdf files and other things.
And what can I tell: SuiteCRM on the new system worked like a charm!
But later, I recognized, that the bitnami/suitecrm image was changed in the repo. So I stopped the instance and removed it (docker rm ...)
Then I pulled the latest image from the repo (docker pull ...) and started up with the new image (docker run ... )
I provided again db user and password etc. with this command.
And that leads to a problem....
The database was completely reinitialized! So I wasn't able to login with my credentials anymore. but the persistant folders were kept in place.
To solve the problem with the database was very easy: just import the recently created backup. Again, SuiteCRM worked like a charm.
My question here is:
How can I avoid the reinitialization of the database when upgrading the container image?
Is there maybe a "marker" set inside the db or somewhere else that I was got rid when importing the database the first time?
Or does the install routine simply not check if there is an already existing database?
Any hints are appreciated...