From beb4a7fa6bb7b4da0645fc4525ab7fe3fad2a857 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 22 Feb 2026 13:53:52 +0100 Subject: [PATCH 1/3] chore: Add caddy helper commands --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 774155f..d2de420 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ COMPOSE := DOCKER_HOST=$(DOCKER_HOST) $(COMPOSE_CMD) psql: $(COMPOSE) exec inventree-db sh -c 'psql $$POSTGRES_USER $$POSTGRES_DB' +.PHONY: update update: read -p "Update will cause downtime of the server. Are you sure you want to continue? Press Ctrl+c to abort!" _ $(COMPOSE) pull @@ -17,6 +18,14 @@ update: data: # podman does not autocreate data folder mkdir data +.PHONY: caddy-check +caddy-check: + docker run --rm --env-file .env -v ./Caddyfile:/etc/caddy/Caddyfile:ro,Z caddy:alpine caddy validate --config /etc/caddy/Caddyfile + +.PHONY: caddy-print +caddy-print: + docker run --rm --env-file .env -v ./Caddyfile:/etc/caddy/Caddyfile:ro,Z caddy:alpine caddy adapt --config /etc/caddy/Caddyfile --pretty + # pass all commands to compose cli %: data $(COMPOSE) $@ From 22c0929b5bc792efd0a6d17d4fb05074567b7129 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 22 Feb 2026 13:54:16 +0100 Subject: [PATCH 2/3] plugins: Remove custom barcode plugin --- plugins/ctbk_barcode.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 plugins/ctbk_barcode.py diff --git a/plugins/ctbk_barcode.py b/plugins/ctbk_barcode.py deleted file mode 100644 index 1e56125..0000000 --- a/plugins/ctbk_barcode.py +++ /dev/null @@ -1,25 +0,0 @@ -from plugin import InvenTreePlugin -from plugin.mixins import BarcodeMixin -from part.models import Part -import structlog - -logger = structlog.get_logger("ctbk.barcode") - - -class CtbkBarcodePlugin(BarcodeMixin, InvenTreePlugin): - TITLE = "CTBK IPN Barcode Plugin" - NAME = "ctbk-ipn-barcode-plugin" - DESCRIPTION = "Supports the CTBK IPN format directly in barcodes" - VERSION = "0.0.1" - AUTHOR = "kleines Filmröllchen" - - def scan(self, barcode_data): - if barcode_data.startswith("963e5440-"): - try: - instance = Part.objects.get(IPN=barcode_data.strip()) - label = Part.barcode_model_type() - - return {label: instance.format_matched_response()} - except Part.DoesNotExist: - logger.error("could not find a part for barcode %s", barcode_data) - pass From 68bbebae2a1a3060259599b73485fcecdef41f87 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 22 Feb 2026 13:55:24 +0100 Subject: [PATCH 3/3] fix(proxy): Auto-adapt to custom INVENTREE_WEB_PORT --- compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compose.yml b/compose.yml index a3b5474..8008e84 100644 --- a/compose.yml +++ b/compose.yml @@ -113,6 +113,8 @@ services: - 443:443 env_file: - .env + environment: + INVENTREE_SERVER: http://inventree-server:${INVENTREE_WEB_PORT} volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro,z - ${INVENTREE_EXT_VOLUME}/static:/var/www/static:z