Skip to content

Commit

Permalink
fix(realtime): bump up version to 2.29.13 (#2444)
Browse files Browse the repository at this point in the history
* realtime: Bump up version to 2.29.12

This removes some complexity from starting up realtime into realtime startup process. To know more please check supabase/realtime#1081

* chore: restore realtime migration script

* fix: remove semicolon from docker cmd

---------

Co-authored-by: Qiao Han <[email protected]>
  • Loading branch information
filipecabaco and sweatybridge authored Jun 27, 2024
1 parent 6cdd2b1 commit dd2ba72
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
11 changes: 5 additions & 6 deletions internal/db/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,16 @@ func initSchema15(ctx context.Context, host string) error {
"DB_ENC_KEY=" + utils.Config.Realtime.EncryptionKey,
"API_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
"METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
"FLY_APP_NAME=realtime",
"APP_NAME=realtime",
"SECRET_KEY_BASE=" + utils.Config.Realtime.SecretKeyBase,
"ERL_AFLAGS=" + utils.ToRealtimeEnv(utils.Config.Realtime.IpVersion),
"ENABLE_TAILSCALE=false",
"DNS_NODES=''",
"RLIMIT_NOFILE=",
"RLIMIT_NOFILE=10000",
"SEED_SELF_HOST=true",
fmt.Sprintf("MAX_HEADER_LENGTH=%d", utils.Config.Realtime.MaxHeaderLength),
}, []string{"/bin/sh", "-c", fmt.Sprintf(
`/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo); Application.ensure_all_started(:realtime); Realtime.Tenants.health_check("%s")'`,
utils.Config.Realtime.TenantId,
)}, io.Discard, logger); err != nil {
}, []string{"/app/bin/realtime", "eval", fmt.Sprintf(`{:ok, _} = Application.ensure_all_started(:realtime)
{:ok, _} = Realtime.Tenants.health_check("%s")`, utils.Config.Realtime.TenantId)}, io.Discard, logger); err != nil {
return err
}
if err := utils.DockerRunOnceWithStream(ctx, utils.Config.Storage.Image, []string{
Expand Down
10 changes: 3 additions & 7 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,19 +678,15 @@ EOF
"DB_ENC_KEY=" + utils.Config.Realtime.EncryptionKey,
"API_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
"METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
"FLY_APP_NAME=realtime",
"APP_NAME=realtime",
"SECRET_KEY_BASE=" + utils.Config.Realtime.SecretKeyBase,
"ERL_AFLAGS=" + utils.ToRealtimeEnv(utils.Config.Realtime.IpVersion),
"ENABLE_TAILSCALE=false",
"DNS_NODES=''",
"RLIMIT_NOFILE=",
"RLIMIT_NOFILE=10000",
"SEED_SELF_HOST=true",
fmt.Sprintf("MAX_HEADER_LENGTH=%d", utils.Config.Realtime.MaxHeaderLength),
},
// TODO: remove this after deprecating PG14
Cmd: []string{
"/bin/sh", "-c",
"/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server",
},
ExposedPorts: nat.PortSet{"4000/tcp": {}},
Healthcheck: &container.HealthConfig{
// Podman splits command by spaces unless it's quoted, but curl header can't be quoted.
Expand Down
2 changes: 1 addition & 1 deletion internal/start/templates/pooler.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Application.ensure_all_started(:supavisor)
{:ok, _} = Application.ensure_all_started(:supavisor)

{:ok, version} =
case Supavisor.Repo.query!("select version()") do
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
SupavisorImage = "supabase/supavisor:1.1.56"
PgProveImage = "supabase/pg_prove:3.36"
GotrueImage = "supabase/gotrue:v2.151.0"
RealtimeImage = "supabase/realtime:v2.28.32"
RealtimeImage = "supabase/realtime:v2.29.13"
StorageImage = "supabase/storage-api:v1.0.6"
LogflareImage = "supabase/logflare:1.4.0"
// Should be kept in-sync with EdgeRuntimeImage
Expand Down

0 comments on commit dd2ba72

Please sign in to comment.