fix(service): Garage doesn't start due to RPC secret being wrong length (#10425)

This commit is contained in:
Andras Bacsai
2026-06-02 12:01:41 +02:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+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)) {
+1 -1
View File
@@ -12,7 +12,7 @@ services:
- GARAGE_S3_API_URL=$GARAGE_S3_API_URL
- GARAGE_WEB_URL=$GARAGE_WEB_URL
- GARAGE_ADMIN_URL=$GARAGE_ADMIN_URL
- GARAGE_RPC_SECRET=${SERVICE_HEX_32_RPCSECRET}
- GARAGE_RPC_SECRET=${SERVICE_HEX_64_RPCSECRET}
- GARAGE_ADMIN_TOKEN=$SERVICE_PASSWORD_GARAGE
- GARAGE_METRICS_TOKEN=$SERVICE_PASSWORD_GARAGEMETRICS
- GARAGE_ALLOW_WORLD_READABLE_SECRETS=true