[Koha-devel] ktd and persistent data

Jonathan Druart jonathan.druart at bugs.koha-community.org
Wed Sep 20 12:24:38 CEST 2023


Hi Janusz,

You won't manage to test the merge request unless you build your own image,
and use misc4dev with the correct remote/branch (see
DEBUG_GIT_REPO_MISC4DEV* in ktd's .env file).

What you are suggesting for misc4dev is more or less what I have done on
the related merge request, I think
https://gitlab.com/koha-community/koha-misc4dev/-/merge_requests/57

Feel free to suggest follow-up commits if you want to make this move
forward, I don't have much interest in it at the moment, sorry!

Cheers,
Jonathan

Le lun. 18 sept. 2023 à 22:48, <januszop at gmail.com> a écrit :

> Hi Jonathan,
>
>
>
> Thank you very much for you kind reply and explanation.  This is really
> comforting—at least I can be sure this was not because of my ignorance that
> it did not work.
>
>
>
> As to the merge request, if I understand it correctly, we would have to
> edit the .env file and put there the environment variable USE_EXISTING_DB
> by hand after creating the db (i.e. before the second run of kp)?
>
>
>
> Why not to put the environment variable in the docker-compose.persistent.yml
> file (by adding there a value for the key services//koha//environment//
> USE_EXISTING_DB) and then conditionally skip the creation of the database
> in populate_db.pl if 1) the variable is set AND 2) the database exists
> and is not empty (which could be tested as it is now, with prefs_count or
> $patrons_count, for instance)?
>
>
>
> In addition, in this case probably an alias should be created for ‘docker
> volume rm koha_db-data’ to easily delete the volume if necessary…
>
>
>
> Wouldn’t it be a possibility?
>
>
>
> Best greetings,
>
>
>
> Janusz
>
>
>
> *From:* Jonathan Druart <jonathan.druart at gmail.com>
> *Sent:* Monday, September 18, 2023 11:36 AM
> *To:* januszop at gmail.com
> *Cc:* koha-devel at lists.koha-community.org
> *Subject:* Re: [Koha-devel] ktd and persistent data
>
>
>
> Hi Janusz,
>
>
>
> It does not work.
>
> There is a merge request however:
> https://gitlab.com/koha-community/koha-testing-docker/-/merge_requests/410
>
>
>
> Cheers,
>
> Jonathan
>
>
>
> Le sam. 16 sept. 2023 à 00:42, <januszop at gmail.com> a écrit :
>
> Hi All,
>
> This is (probably) my first post on this list. I had the pleasure of
> meeting
> some of you recently in Helsinki (and before that in Dublin in 2019). I
> live
> in Krakow, Poland and take care of several Koha installations in
> medium-sized scientific and theological libraries. Much of my time is spent
> analyzing and correcting bibliographic data. However, if my libraries
> encounter any problems in Koha, I try to report them in Bugzilla and, if
> possible, provide patches as well (I sent the first official patch in
> 2011).
> Sometimes I don't have enough patience or time and I patch problems locally
> (forgive me, I feel guilty here)...
>
> The Helsinki meeting encouraged me to use ktd more intensively. Here,
> however, I run into a problem trying to use persistent data (kp command as
> described at
>
> https://gitlab.com/koha-community/koha-testing-docker/-/wikis/Koha-Testing-D
> ocker). Docker creates the koha_db-data volume as expected. However, after
> shutting down the test environment (with kd command), when trying to run it
> again (kp), the koha container does not start properly -- it ends with the
> message:
>
> Database is not empty! at /kohadevbox/misc4dev/populate_db.pl line 103.
>
> Indeed, the populate_db.pl script is executed unconditionally when
> starting
> this container.
>
> Question: what am I doing wrong or what did I not understand? What should
> be
> the scheme of working with persistent data?
>
> I would appreciate a hint.
>
> Greetings,
> Janusz
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20230920/b1bae64e/attachment.htm>


More information about the Koha-devel mailing list