Make KorAP (Kalamar) port configurable

Change-Id: I040ce30f4226f7cc41f8f49fbac4998c504749ca
Signed-off-by: Marc Kupietz <kupietz@ids-mannheim.de>
diff --git a/Makefile b/Makefile
index c143581..137e731 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 SHELL := /bin/bash
 SRC_DIR ?= I5
+KORAP_PORT ?= 64543
 
 # Discover all *.i5.xml files in SRC_DIR
 I5_FILES := $(wildcard $(SRC_DIR)/*.i5.xml)
@@ -134,7 +135,7 @@
 	java -jar lib/Krill-Indexer.jar -c lib/krill.cfg --progress -i $(subst " ",;,$^) -o $@
 
 korap: check-src $(TARGET_DIR)/index
-	curl https://raw.githubusercontent.com/KorAP/KorAP-Docker/master/compose.yaml | INDEX='$(TARGET_DIR)/index' docker compose -p korap -f - --profile=lite --profile=example up
+	curl -s https://raw.githubusercontent.com/KorAP/KorAP-Docker/master/compose.yaml | sed 's/64543:64543/$(KORAP_PORT):64543/g' | COMPOSE_PROFILES='export' INDEX='$(TARGET_DIR)/index' docker compose -p korap -f - --profile=lite --profile=example up
 
 $(TARGET_DIR)/index.tar.xz: $(TARGET_DIR)/index
 	tar -I 'xz -T0' -C $(dir $<) -cf $@ $(notdir $<)
diff --git a/Readme.md b/Readme.md
index e31cb66..6623d15 100644
--- a/Readme.md
+++ b/Readme.md
@@ -18,6 +18,13 @@
 
 Then open http://localhost:64543 in your browser.
 
+If port `64543` is already in use on your host (e.g. by another process or IDE port-forwarding helper), you can specify a different host port using the `KORAP_PORT` variable:
+
+```bash
+make KORAP_PORT=64544
+```
+
+Then open the corresponding URL (e.g., http://localhost:64544) in your browser.
 ### Standard TEI P5 Support
 
 Standard TEI P5 files (which typically contain one text per file) can be batch-converted together. By default, place your `.xml` files in the `TEI` directory in the root of the project: