module_netbox: pass postgres image and tag as separate args (fix HTTP 404 pull)#908
module_netbox: pass postgres image and tag as separate args (fix HTTP 404 pull)#908igorpecovnik wants to merge 1 commit into
Conversation
… 404 pull) module_postgres install takes six positional args: <user> <password> <db> <image-repo> <image-tag> <container-name> netbox was passing five — fusing image and tag into one arg and omitting the container-name slot entirely. The fused arg landed in postgres_image and the actual container-name landed in postgres_tag, so module_postgres built dockerimage="postgres:17-alpine:postgres-netbox" which Docker 404s on pull, and dockername defaulted to "postgres" which would also collide with any standalone postgres install. Split DATABASE_IMAGE into DATABASE_IMAGE + DATABASE_TAG and add DATABASE_HOST in its proper sixth slot. module_immich already does this correctly — pattern now matches.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
linuxserver/reverse-proxy-confs:master doesn't ship a sample for every
service we package — netbox and immich are the obvious gaps. The
existing docker_configure_swag_proxy() returns 1 when no sample is
present, so the swag-aware install paths in those modules silently
no-op on real deployments.
Add a generic helper next to docker_configure_swag_proxy:
docker_seed_swag_proxy_conf <servicename> <<'NGINX'
location ^~ /<svc> { … }
NGINX
Reads the conf body from stdin and writes it as
/config/nginx/proxy-confs/<svc>.subfolder.conf.sample inside the SWAG
container. Returns 2 on no-SWAG (no-op), 0 on success or if a sample
already exists (defer to LSIO upstream when they eventually ship one,
keep an admin's hand-edited sample intact across re-installs), 1 on
docker exec failure.
module_netbox now seeds its own subfolder proxy-conf before calling
docker_configure_swag_proxy, and conditionally adds BASE_PATH=netbox
to the netbox container env when a SWAG container is present at
install time. Without BASE_PATH the rendered HTML emits absolute
/static/ /api/ … URLs that 404 once SWAG serves NetBox at /netbox.
Trade-off: direct port access (http://host:port/) stops working —
only http://host:port/netbox/ — but SWAG is the intended way in once
it's set up.
Same pattern can be reused for immich and any future
no-LSIO-sample service in a follow-up; the helper is generic.
Depends on #908 (passes postgres image+tag separately) for the netbox
install to reach this code path.
|
Superseded — squashed into #906 alongside the SWAG wiring. |
Symptom
Installing
netboxfails on the first dependency step with:(see screenshot)
Root cause
module_postgresaccepts six positional args afterinstall:and assembles
dockerimage="${image-repo}:${image-tag}"anddockername="${container-name}".module_netboxwas passing five — fusing image and tag into one arg and dropping the container-name slot:So inside
module_postgres:postgres_image="postgres:17-alpine"(already contains a tag)postgres_tag="postgres-netbox"(was meant to be the container name)postgres_container=""→ defaulted to"postgres"Result:
dockerimage="postgres:17-alpine:postgres-netbox"(Docker rejects with 404 — image refs only allow one:), and the postgres container would have spawned under the namepostgres, colliding with any standalone postgres install.Fix
Split
DATABASE_IMAGEintoDATABASE_IMAGE(postgres) +DATABASE_TAG(17-alpine) and passDATABASE_HOSTin its proper sixth slot:This matches the pattern
module_immichalready uses — netbox was the one outlier.Test plan
module_netbox installpullspostgres:17-alpine, names the resulting containerpostgres-netbox, and proceeds to install netbox itself without the 404 dialog.postgrescontainer:module_netbox installdoesn't disturb it (createspostgres-netboxalongside).docker container ls -aafter install shows bothpostgres-netboxandnetboxrunning.