[Koha-devel] Starting/stopping koha-testing-docker
dcook at prosentient.com.au
dcook at prosentient.com.au
Fri Feb 7 01:18:28 CET 2020
Thanks, Tomas, but the issue isn’t the database. I was probably misleading in my original email. The issue is that the /kohadevbox/run.sh script tries to re-provision the koha_koha_1 server, and it fatally fails to do so. Before doing the setup, it should do a test to see if it needs to do the setup.
But the --force-recreate option is practical enough for now. If it bothers me enough going forward, I’ll do a patch and send in a pull request for the run.sh script
It’s probably not a bad thing to re-create the containers each time just to have a clean code and configuration environment, but it makes long-term work more difficult.
Recently, I created a jboss/keycloak container, and I just start/stop that container whenever I need a Keycloak server. Same with a lot of containers I use. Of course, that means it’s easier for untracked localizations to sneak in and then you destroy the container and create a new one and it’s radically different to what you’re using but *shrug*.
Anyway, good to know that we can’t stop/start koha-testing-docker. I thought I was missing something, but it just looks like it’s not possible currently.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
From: Tomas Cohen Arazi <tomascohen at theke.io>
Sent: Friday, 7 February 2020 10:55 AM
To: David Cook <dcook at prosentient.com.au>
Cc: Agustin Moyano <agustinmoyano at theke.io>; koha-devel <koha-devel at lists.koha-community.org>
Subject: Re: [Koha-devel] Starting/stopping koha-testing-docker
There's one alias for persistent db. That might suit you
El jue., 6 de febrero de 2020 20:45, <dcook at prosentient.com.au <mailto:dcook at prosentient.com.au> > escribió:
Hi Agustin,
Thanks for your email. However, I think that perhaps you misunderstand me. I’m not trying to re-create the containers; I’m trying to re-use/re-start the existing containers.
Your first suggestion will recreate the containers by destroying the old ones. That means I can’t re-use them.
Your second suggestion requires the container to be running, but my use case is starting a stopped container, which has been stopped either manually, by a system reboot, or whatever.
I suppose I could modify the docker-compose.yml file to have a custom command, and just manually run /kohadevbox/run.sh when I initially create the container… that might be the shortest path to what I’m trying to do.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
From: Agustin Moyano <agustinmoyano at theke.io <mailto:agustinmoyano at theke.io> >
Sent: Friday, 7 February 2020 1:12 AM
To: dcook at prosentient.com.au <mailto:dcook at prosentient.com.au>
Cc: koha-devel <koha-devel at lists.koha-community.org <mailto:koha-devel at lists.koha-community.org> >; tomascohen at theke.io <mailto:tomascohen at theke.io>
Subject: Re: [Koha-devel] Starting/stopping koha-testing-docker
Hi David, you have 2 ways.
First if you started koha-testing-docker using the script alias "ku", the script has the "--force-recreate" flag when it runs.. that means if you kill it, and start it again with ku you wont have any problems.
The other way is to not kill the container, but simply do "reset_all" inside docker container... that is basically the same in the way that it will cleanup your database and install everything from scratch.
Hope it helps!
On Thu, Feb 6, 2020 at 2:16 AM <dcook at prosentient.com.au <mailto:dcook at prosentient.com.au> > wrote:
Hi all,
Is there a trick for stopping and starting koha-testing-docker, when using docker-compose, so that you can re-use the same containers?
I stop/start containers all the time on other projects, and I swear that Tomas told me how to do it with koha-testing-docker, but koha_koha_1 keeps crashing with “User kohadev-koha already exists” after I try to start it after stopping it, as it’s trying to run /kohadevbox/run.sh. Perhaps /kohadevbox/run.sh should have a test where it only tries to do setup if it hasn’t already setup the container environment.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org <mailto:Koha-devel at lists.koha-community.org>
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200207/fe561a55/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200207/fe561a55/attachment-0001.sig>
More information about the Koha-devel
mailing list