Commit f709a0f
committed
swag: docker_seed_swag_proxy_conf helper, wire netbox subfolder proxy
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.1 parent dcd1c52 commit f709a0f
2 files changed
Lines changed: 94 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
69 | 90 | | |
70 | 91 | | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
| 95 | + | |
| 96 | + | |
74 | 97 | | |
75 | 98 | | |
76 | 99 | | |
| |||
102 | 125 | | |
103 | 126 | | |
104 | 127 | | |
105 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
106 | 132 | | |
107 | 133 | | |
108 | 134 | | |
| |||
144 | 170 | | |
145 | 171 | | |
146 | 172 | | |
147 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
148 | 193 | | |
149 | 194 | | |
150 | 195 | | |
| |||
0 commit comments