Add a way to launch many KTDs in parallel
In many situations, we need to run several instances:
- In the middle of a dev, we are asked to QA something and don't want to go through setting everything back to where we were once we finished.
- We need to compare the behavior in two different codebases
- See different versions of Koha in parallel
- Etc
One of the issues for doing this is that we have a hardcoded set of ports for KTD, and there's also the problem with the hostnames.
I propose we use:
- A local reverse proxy to route requests to each
KTDinstance - Have a way to specify different
KTDinstance names
For the end user it would imply:
ktd_proxy --start
ktd --proxy --name nick up -d
Then, the KTD instance will be available in nick.localhost and nick-intra.localhost, through a standard port (shared by all instances).
If we wanted to launch (say) a 23.11 Koha in parallel:
cd ~/git
git clone koha/ --branch=23.11.x koha-23.11/
SYNC_REPO=/Users/tcohen/git/koha-23.11 ktd --proxy --name tomas up -d
which would be accessible in tomas.localhost and tomas-intra.localhost.
This can of course be combined with different DB_IMAGE and KOHA_IMAGE if needed.
The proxy I'd pick is traefik which is pretty handy for dynamic route definitions.