@@ -272,7 +272,7 @@ func InitSchema14(ctx context.Context, conn *pgx.Conn) error {
272
272
return file .ExecBatch (ctx , conn )
273
273
}
274
274
275
- func initRealtimeJob (host string ) utils.DockerJob {
275
+ func initRealtimeJob (host , jwks string ) utils.DockerJob {
276
276
return utils.DockerJob {
277
277
Image : utils .Config .Realtime .Image ,
278
278
Env : []string {
@@ -284,6 +284,7 @@ func initRealtimeJob(host string) utils.DockerJob {
284
284
"DB_NAME=postgres" ,
285
285
"DB_AFTER_CONNECT_QUERY=SET search_path TO _realtime" ,
286
286
"DB_ENC_KEY=" + utils .Config .Realtime .EncryptionKey ,
287
+ fmt .Sprintf ("API_JWT_JWKS=%s" , jwks ),
287
288
"API_JWT_SECRET=" + utils .Config .Auth .JwtSecret .Value ,
288
289
"METRICS_JWT_SECRET=" + utils .Config .Auth .JwtSecret .Value ,
289
290
"APP_NAME=realtime" ,
@@ -341,7 +342,11 @@ func initSchema15(ctx context.Context, host string) error {
341
342
// Apply service migrations
342
343
var initJobs []utils.DockerJob
343
344
if utils .Config .Realtime .Enabled {
344
- initJobs = append (initJobs , initRealtimeJob (host ))
345
+ jwks , err := utils .Config .Auth .ResolveJWKS (context .Background ())
346
+ if err != nil {
347
+ return err
348
+ }
349
+ initJobs = append (initJobs , initRealtimeJob (host , jwks ))
345
350
}
346
351
if utils .Config .Storage .Enabled {
347
352
initJobs = append (initJobs , initStorageJob (host ))
0 commit comments