Move Garage and garage-webui to stpcore
Garage now runs on the stpcore LXC (adamf/stpcore), the shared core other stacks depend on. caddy, backend and usaco pin the name `garage` to it with GARAGE_UPSTREAM; /garage/ goes to stpcore's Caddy with X-Core-Token. The disk fallback for /uploads/ is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -159,6 +159,10 @@
|
||||
handle @radar_offline {
|
||||
respond "Partner Radar is offline." 503
|
||||
}
|
||||
@garage_offline vars garage_upstream yes
|
||||
handle @garage_offline {
|
||||
respond "The Garage admin UI (stpcore) is offline." 503
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-9
@@ -124,14 +124,23 @@ handle /dozzle/* {
|
||||
}
|
||||
}
|
||||
|
||||
# Holds Garage's admin token. 2 GB for video uploads.
|
||||
# garage-webui on stpcore, behind its Caddy, which wants X-Core-Token (header_up
|
||||
# replaces any client-sent one). Holds Garage's admin token. 2 GB for video
|
||||
# uploads. A `route` so garage_upstream is set only after the gate passes.
|
||||
handle /garage/* {
|
||||
import admin_gate
|
||||
request_body {
|
||||
max_size 2GB
|
||||
}
|
||||
reverse_proxy garage-webui:3909 {
|
||||
import proxy
|
||||
route {
|
||||
import admin_gate
|
||||
request_body {
|
||||
max_size 2GB
|
||||
}
|
||||
vars garage_upstream yes
|
||||
reverse_proxy garage:3909 {
|
||||
import proxy
|
||||
header_up X-Core-Token {env.GARAGE_WEBUI_TOKEN}
|
||||
transport http {
|
||||
dial_timeout 3s
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,8 +278,8 @@ handle /uploads/private/* {
|
||||
file_server
|
||||
}
|
||||
|
||||
# Garage first, disk second: a 404, 5xx or dial error falls back to the
|
||||
# volume, so the bucket is the source of truth.
|
||||
# Garage (on stpcore) first, disk second: a 404, 5xx or dial error falls back
|
||||
# to the volume, so the bucket is the source of truth.
|
||||
handle /uploads/* {
|
||||
import upload_headers
|
||||
vars uploads_fallback yes
|
||||
|
||||
Reference in New Issue
Block a user