Skip to content

Issue #179: Implement DB persistency

joubu requested to merge joubu/koha-testing-docker:issue_179 into main

This patch adds a new USE_EXISTING_DB env var that can be set to "yes". If done, and docker-compose.persistent.yml is used, the DB will be stored on a persistent volume, and kept from on startup to another.

Test plan:

  • Apply this patch
  • Edit your .env
    • Add USE_EXISTING_DB=yes
    • Edit the following misc4dev line to use the related code there DEBUG_GIT_REPO_MISC4DEV=yes DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/Joubu/koha-misc4dev.git DEBUG_GIT_REPO_MISC4DEV_BRANCH=issue_61
  • Build the image % KOHA_IMAGE_OS=bullseye docker-compose -f docker-compose-build.yml -f docker-compose.persistent.yml -f docker-compose.mariadb_d11.yml -p koha up
  • Once done, access the koha container % docker exec -it koha_koha_1 bash
  • And modify the DB
  • Shut the container down % docker-compose -p koha down
  • Start it again
  • Notice that your changes have been kept!
Edited by joubu

Merge request reports

Loading