Skip to content

Commit

Permalink
realtime: Bump up version to 2.29.12
Browse files Browse the repository at this point in the history
This removes some complexity from starting up realtime into realtime startup process. To know more please check supabase/realtime#1081
  • Loading branch information
filipecabaco committed Jun 24, 2024
1 parent 29d4cba commit 098811b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
24 changes: 0 additions & 24 deletions internal/db/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,30 +223,6 @@ func initSchema14(ctx context.Context, conn *pgx.Conn) error {
func initSchema15(ctx context.Context, host string) error {
// Apply service migrations
logger := utils.GetDebugLogger()
if err := utils.DockerRunOnceWithStream(ctx, utils.Config.Realtime.Image, []string{
"PORT=4000",
"DB_HOST=" + host,
"DB_PORT=5432",
"DB_USER=supabase_admin",
"DB_PASSWORD=" + utils.Config.Db.Password,
"DB_NAME=postgres",
"DB_AFTER_CONNECT_QUERY=SET search_path TO _realtime",
"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",
"SECRET_KEY_BASE=" + utils.Config.Realtime.SecretKeyBase,
"ERL_AFLAGS=" + utils.ToRealtimeEnv(utils.Config.Realtime.IpVersion),
"ENABLE_TAILSCALE=false",
"DNS_NODES=''",
"RLIMIT_NOFILE=",
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 {
return err
}
if err := utils.DockerRunOnceWithStream(ctx, utils.Config.Storage.Image, []string{
"DB_INSTALL_ROLES=false",
"ANON_KEY=" + utils.Config.Auth.AnonKey,
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/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.12"
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 098811b

Please sign in to comment.