From 4f022ec43ab3e6d774ea225e6116fd42e9ba4d77 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Wed, 9 Sep 2026 14:29:40 +0200 Subject: [PATCH] Fix production outage: build context and kiwix arg duplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker-compose's build context resolves relative to the symlink's own directory (/srv/podman/maptool/), same as volume paths — but the checkout now lives one level down in build/, so "build: ." pointed at the wrong place and compose up --build failed outright looking for a Dockerfile that isn't there. Point it at ./build instead. Also drop kiwix's explicit --port=8080: the image's own start.sh already prepends its default --port=8080 before appending the command array, so passing it again produced "Unexpected argument" and the container never started. Both applied directly to production to restore service, verified via docker-compose config + live health checks. --- docker-compose.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index a1d0ee6..0439b36 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,16 @@ services: maptool: - build: . + # "./build", not ".": the compose file's own context ("." would mean + # the symlink's directory, /srv/podman/maptool/ — see docs/deployment.adoc) + # is one level above where the actual checkout (and its Dockerfile) + # lives since the previous commit moved it into build/. Volume paths + # below resolve against that same symlink directory too, but a relative + # *build context* specifically needs pointing at build/ itself — the + # gap this fixes: production's compose up --build failed outright + # ("lstat .../maptool/Dockerfile: no such file or directory") until this + # was caught, since only the volume-path resolution got dry-run tested + # before the previous commit shipped, not this one. + build: ./build image: maptool:latest restart: unless-stopped ports: @@ -72,6 +82,10 @@ services: kiwix: image: ghcr.io/kiwix/kiwix-serve:latest restart: unless-stopped - command: ["--port=8080", "/data/wikipedia.zim"] + # No --port here: the image's own start.sh already prepends + # --port=8080 (its default) before appending this command array, so + # passing it again produced "Unexpected argument: --port=8080, + # --port=8080, /data/wikipedia.zim" and kiwix-serve refused to start. + command: ["/data/wikipedia.zim"] volumes: - ./data/kiwix/wikipedia.zim:/data/wikipedia.zim