fix(templates): generate valid Garage RPC secret

Garage requires a 32 bytes secret (which is a 64 char hex string)
This commit is contained in:
Jérémy Derdaele authored and Jérémy committed 2026-05-31 23:57:46 +02:00
1 parent 8a52307255
commit b5416859e5
4 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -778,7 +778,8 @@ class Service extends BaseModel
}
$rpc_secret = $this->environment_variables()->where('key', 'GARAGE_RPC_SECRET')->first();
if (is_null($rpc_secret)) {
$rpc_secret = $this->environment_variables()->where('key', 'SERVICE_HEX_32_RPCSECRET')->first();
$rpc_secret = $this->environment_variables()->where('key', 'SERVICE_HEX_64_RPCSECRET')->first()
?? $this->environment_variables()->where('key', 'SERVICE_HEX_32_RPCSECRET')->first();
}
$metrics_token = $this->environment_variables()->where('key', 'GARAGE_METRICS_TOKEN')->first();
if (is_null($metrics_token)) {