Skip to content

Database reinitializes every time you run docker compose down then up #25

Description

@biker2000on

Symptoms:

  1. run openMaint using the default setup with docker-compose up -d
  2. Add something to the database
  3. docker-compose down
  4. docker-compose up -d

In the logs you can see that after step 4 the docker-entrypoint.sh runs the dbcreate command again causing the database to be wiped every time it is started anew. It looks like in docker-entrypoint.sh there used to be some kind of check, but the code will never the section after the ||, it always runs the first command below.

echo "Init DB"
{ # try
  
    $CATALINA_HOME/webapps/cmdbuild/cmdbuild.sh dbconfig create $CMDBUILD_DUMP -configfile $CATALINA_HOME/conf/cmdbuild/database.conf
   
} || { 
    echo "DB was initiliazed. Use dbconfig recreate or dbconfig drop"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions