compose: shared :z on data mounts so kiwix can read its ZIM
CI / check (push) Successful in 40s
CI / deploy (push) Successful in 12s

maptool's private :Z on ./data recursively relabeled
data/kiwix/wikipedia.zim to maptool's own MCS label, locking the kiwix
container out of it ("Unable to add the ZIM file"), and kiwix's :Z
would do the same back. Both mount the same file, so the label has to
be shared.
This commit is contained in:
randy committed 2026-10-24 00:54:15 +02:00
1 parent efddc55ad0
commit 2d6cdeaaf4
1 file changed
+10 -8
+10 -8
View File
@@ -65,12 +65,14 @@ services:
# happens outside this mount, in the container's own filesystem — a
# large country's .osm.pbf plus Planetiler's working set can be
# several GB, worth knowing if the host is ever short on space there.
# :Z (not :z — this path is only ever mounted into this one
# container) relabels the host directory for SELinux, since Podman
# on an SELinux-enforcing host otherwise denies the container write
# access to a bind-mounted directory regardless of Unix permissions
# — harmless/ignored on a host without SELinux.
- ./data:/app/data:Z
# :z relabels the host directory for SELinux, since Podman on an
# SELinux-enforcing host otherwise denies the container write access
# to a bind-mounted directory regardless of Unix permissions —
# harmless/ignored on a host without SELinux. Shared :z, not private
# :Z: kiwix below mounts data/kiwix/wikipedia.zim too, and :Z here
# recursively relabels that file to maptool's own private label,
# locking kiwix out of it (and kiwix's :Z would do the same back).
- ./data:/app/data:z
# Fakes a GNSS fix (a loop around Bratislava, see
# bin/gnss_simulator.rb/docs/development.adoc) since there's no real
@@ -123,8 +125,8 @@ services:
# ever talks to this container directly.
command: ["--urlRootLocation=/kiwix", "/data/wikipedia.zim"]
volumes:
# :Z, same SELinux reasoning as maptool's own ./data mount above.
- ./data/kiwix/wikipedia.zim:/data/wikipedia.zim:Z
# :z, shared for the same reason as maptool's own ./data mount above.
- ./data/kiwix/wikipedia.zim:/data/wikipedia.zim:z
networks:
default: