diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index bb098be..7127349 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -51,6 +51,19 @@ services: # there is no separate namespace, and runc REFUSES it ("not allowed in host network # namespace"). Reader liveness ping uses the HOST's setting instead — the booth host must # set net.ipv4.ping_group_range (see appliance-provisioning §7 / disk-os-hardening). + # + # USB PRINTER PASSTHROUGH. A USB ESC/POS printer (Rongta/Cashino) is the kernel `usblp` char + # device /dev/usb/lpN on the HOST — the container has its own /dev and can't see it (probeUsb + # open() → ENOENT → printer always "offline"). Two parts, both needed: + # - bind-mount /dev/usb so the lpN NODES appear inside the container, and + # - a device-cgroup rule permitting the usblp char major (180) so the kernel allows the + # open(). `180:*` covers lp0/lp1/lp2… so a USB replug/boot-order renumber still works + # (the printer's path can move; set Connection=USB + the matching /dev/usb/lpN in setup). + # (Bind-mounting the dir, not a single `devices:` node, is what survives renumbering.) + volumes: + - /dev/usb:/dev/usb + device_cgroup_rules: + - "c 180:* rmw" logging: driver: json-file options: