From d74d1615fe4f0900ecb345ede3957a104bb4a083 Mon Sep 17 00:00:00 2001 From: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> Date: Thu, 10 Aug 2023 23:49:21 -0700 Subject: [PATCH 1/4] fix: alter database columns' types from varchar to text (#630) --- mix.exs | 2 +- ...810220907_alter_tenants_table_columns_to_text.exs | 12 ++++++++++++ ...220924_alter_extensions_table_columns_to_text.exs | 10 ++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 priv/repo/migrations/20230810220907_alter_tenants_table_columns_to_text.exs create mode 100644 priv/repo/migrations/20230810220924_alter_extensions_table_columns_to_text.exs diff --git a/mix.exs b/mix.exs index 46e95cf3d..f044f4c93 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Realtime.MixProject do def project do [ app: :realtime, - version: "2.19.1", + version: "2.19.2", elixir: "~> 1.14.0", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, diff --git a/priv/repo/migrations/20230810220907_alter_tenants_table_columns_to_text.exs b/priv/repo/migrations/20230810220907_alter_tenants_table_columns_to_text.exs new file mode 100644 index 000000000..fcd386a5a --- /dev/null +++ b/priv/repo/migrations/20230810220907_alter_tenants_table_columns_to_text.exs @@ -0,0 +1,12 @@ +defmodule Realtime.Repo.Migrations.AlterTenantsTableColumnsToText do + use Ecto.Migration + + def change do + alter table(:tenants) do + modify :name, :text + modify :external_id, :text + modify :jwt_secret, :text + modify :postgres_cdc_default, :text, default: "postgres_cdc_rls" + end + end +end diff --git a/priv/repo/migrations/20230810220924_alter_extensions_table_columns_to_text.exs b/priv/repo/migrations/20230810220924_alter_extensions_table_columns_to_text.exs new file mode 100644 index 000000000..2fa58de47 --- /dev/null +++ b/priv/repo/migrations/20230810220924_alter_extensions_table_columns_to_text.exs @@ -0,0 +1,10 @@ +defmodule Realtime.Repo.Migrations.AlterExtensionsTableColumnsToText do + use Ecto.Migration + + def change do + alter table(:extensions) do + modify :type, :text + modify :tenant_external_id, :text + end + end +end From 938cf35b166567c0145e257d31181e795f0d324a Mon Sep 17 00:00:00 2001 From: Chase Granberry Date: Mon, 14 Aug 2023 14:02:31 -0700 Subject: [PATCH 2/4] fix: update config for prod fly v2 (#629) * fix: update config for prod fly v2 * fix: bump version --- deploy/fly/prod.toml | 51 ++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/deploy/fly/prod.toml b/deploy/fly/prod.toml index 0a97086e8..8a3a0fd46 100644 --- a/deploy/fly/prod.toml +++ b/deploy/fly/prod.toml @@ -1,7 +1,15 @@ +# fly.toml app configuration file generated for realtime-prod on 2023-08-08T09:07:09-07:00 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + app = "realtime-prod" +primary_region = "sea" kill_signal = "SIGTERM" -kill_timeout = 5 -processes = [] +kill_timeout = "5s" + +[experimental] + auto_rollback = true [deploy] release_command = "/app/bin/migrate" @@ -10,50 +18,37 @@ processes = [] [env] DNS_NODES = "realtime-prod.internal" ERL_CRASH_DUMP = "/data/erl_crash.dump" - ERL_CRASH_DUMP_SECONDS = 30 - -[experimental] - allowed_public_ports = [] - auto_rollback = true + ERL_CRASH_DUMP_SECONDS = "30" -[mounts] - source="data_vol" - destination="/data" [[services]] + protocol = "tcp" internal_port = 4000 processes = ["app"] - protocol = "tcp" - script_checks = [] - [services.concurrency] - # should match :ranch.info max_connections * num_acceptors - hard_limit = 100000 - soft_limit = 100000 - type = "connections" [[services.ports]] - force_https = true - handlers = ["http"] port = 80 + handlers = ["http"] + force_https = true [[services.ports]] - handlers = ["tls", "http"] port = 443 + handlers = ["tls", "http"] + [services.concurrency] + type = "connections" + hard_limit = 100000 + soft_limit = 100000 [[services.tcp_checks]] - grace_period = "30s" interval = "15s" - restart_limit = 6 timeout = "2s" - + grace_period = "30s" + [[services.http_checks]] - interval = 10000 + interval = "10s" + timeout = "2s" grace_period = "5s" method = "get" path = "/" protocol = "http" - restart_limit = 0 - timeout = 2000 tls_skip_verify = false - [services.http_checks.headers] - From aca825797fb418b6ef50a7883a0bf93e046278ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 14:24:14 -0700 Subject: [PATCH 3/4] chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 in /demo (#621) Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- demo/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/demo/package-lock.json b/demo/package-lock.json index 30ad4e396..66dd15708 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -5833,9 +5833,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -10198,9 +10198,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "wrappy": { From 457106cac51fea13a6b331eb6505f9781f639b77 Mon Sep 17 00:00:00 2001 From: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> Date: Mon, 14 Aug 2023 14:32:25 -0700 Subject: [PATCH 4/4] chore: version bump to v2.19.3 (#631) --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index f044f4c93..ba7eb4ad0 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Realtime.MixProject do def project do [ app: :realtime, - version: "2.19.2", + version: "2.19.3", elixir: "~> 1.14.0", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod,