Well, you’re going to need to have to do one of three things:
Live with just the in-memory H2 database and risk losing data if the container crashes
Connect to a standard, external database instance
Configure docker to provide a persistent storage volume somewhere and then either add a database like MySQL to the container, or configure the H2 database to use local persistence.
I have never done any of the above as I don’t run Camunda in docker. But folks I work with are running it in Kubernetes using SpringBoot, etc., etc., etc. and these are the options we arrived at for them. They chose to connect to a standalone external database.