From 43a2bc2595bea4a41a3e6ed2661f30c526cd014d Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Sun, 21 Jan 2024 13:19:02 +0000 Subject: [PATCH] Move repo to umbrella to fix migration path issue --- docs/DEPLOY.md | 2 +- flavours/classic/config/config.exs | 4 ++-- flavours/classic/config/dev.exs | 2 +- flavours/classic/config/prod.exs | 2 +- flavours/classic/config/runtime.exs | 18 +++++++++--------- flavours/classic/config/test.exs | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index d60c83e472..4f8b38ff1e 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -406,7 +406,7 @@ The common and convenient way for adding HTTPS is by using a reverse proxy like Caddyserver and other servers can handle generating and setting up HTTPS certificates automatically, but if you need TLS/SSL certificates for nginx, you can look get some for free with [letsencrypt](https://letsencrypt.org/). The simplest way to obtain and install a certificate is to use [Certbot.](https://certbot.eff.org). Depending on your specific setup, certbot may be able to get a certificate and configure your web server automatically. -If you've built from source, you should point the nginx root directory to be `_build/prod/rel/bonfire/lib/bonfire-0.1.0-*/priv/static` +If you've built from source, you should point the nginx root directory to be `_build/prod/rel/bonfire/lib/bonfire-[current-version]/priv/static` ## Admin tools diff --git a/flavours/classic/config/config.exs b/flavours/classic/config/config.exs index eede45e5c5..c57843c05b 100755 --- a/flavours/classic/config/config.exs +++ b/flavours/classic/config/config.exs @@ -98,9 +98,9 @@ config :rauversion_extension, :default_layout_module, Bonfire.UI.Common.LayoutVi config :rauversion_extension, :user_table, "pointers_pointer" config :rauversion_extension, :user_key_type, :uuid -config :bonfire, Bonfire.Common.Repo, types: Bonfire.Geolocate.PostgresTypes +config :bonfire_umbrella, Bonfire.Common.Repo, types: Bonfire.Geolocate.PostgresTypes -config :bonfire, Bonfire.Common.TestInstanceRepo, +config :bonfire_umbrella, Bonfire.Common.TestInstanceRepo, types: Bonfire.Geolocate.PostgresTypes, database: "bonfire_test_instance" diff --git a/flavours/classic/config/dev.exs b/flavours/classic/config/dev.exs index 274e4e9d78..e5013c4a12 100755 --- a/flavours/classic/config/dev.exs +++ b/flavours/classic/config/dev.exs @@ -21,7 +21,7 @@ config :activity_pub, sign_object_fetches: federate? # config :pseudo_gettext, :locale, "en-pseudo_text" # uncomment to use https://en.wikipedia.org/wiki/Pseudolocalization and check that the app is properly localisable -config :bonfire, Bonfire.Common.Repo, +config :bonfire_umbrella, Bonfire.Common.Repo, database: System.get_env("POSTGRES_DB", "bonfire_dev"), # show_sensitive_data_on_connection_error: true, # EctoSparkles does the logging instead diff --git a/flavours/classic/config/prod.exs b/flavours/classic/config/prod.exs index 3c2074a751..f4bc74c9d7 100755 --- a/flavours/classic/config/prod.exs +++ b/flavours/classic/config/prod.exs @@ -15,7 +15,7 @@ config :logger, level: :info config :bonfire, Bonfire.Web.Endpoint, server: true -config :bonfire, Bonfire.Common.Repo, +config :bonfire_umbrella, Bonfire.Common.Repo, # in releases migrations are not in a flavour-specific directory priv: "priv/repo" diff --git a/flavours/classic/config/runtime.exs b/flavours/classic/config/runtime.exs index 2afb91f5e3..9c52f4cf8e 100755 --- a/flavours/classic/config/runtime.exs +++ b/flavours/classic/config/runtime.exs @@ -159,22 +159,22 @@ config :bonfire_umbrella, ecto_repos: repos config :paginator, ecto_repos: repos config :activity_pub, ecto_repos: repos -config :bonfire, Bonfire.Common.Repo, repo_connection_config -config :bonfire, Bonfire.Common.TestInstanceRepo, repo_connection_config +config :bonfire_umbrella, Bonfire.Common.Repo, repo_connection_config +config :bonfire_umbrella, Bonfire.Common.TestInstanceRepo, repo_connection_config config :beacon, Beacon.Repo, repo_connection_config -config :bonfire, Bonfire.Common.Repo, database: database +config :bonfire_umbrella, Bonfire.Common.Repo, database: database config :beacon, Beacon.Repo, database: database config :paginator, Paginator.Repo, database: database -config :bonfire, Bonfire.Common.Repo, pool_size: pool_size -config :bonfire, Bonfire.Common.TestInstanceRepo, pool_size: pool_size +config :bonfire_umbrella, Bonfire.Common.Repo, pool_size: pool_size +config :bonfire_umbrella, Bonfire.Common.TestInstanceRepo, pool_size: pool_size config :beacon, Beacon.Repo, pool_size: pool_size config :paginator, Paginator.Repo, pool_size: pool_size repo_path = System.get_env("DB_REPO_PATH", "priv/repo") -config :bonfire, Bonfire.Common.Repo, priv: repo_path -config :bonfire, Bonfire.Common.TestInstanceRepo, priv: repo_path +config :bonfire_umbrella, Bonfire.Common.Repo, priv: repo_path +config :bonfire_umbrella, Bonfire.Common.TestInstanceRepo, priv: repo_path config :bonfire, Oban, repo: Bonfire.Common.Repo, @@ -284,7 +284,7 @@ end # start prod-only config if config_env() == :prod do - config :bonfire, Bonfire.Common.Repo, + config :bonfire_umbrella, Bonfire.Common.Repo, # ssl: true, # database: System.get_env("POSTGRES_DB", "bonfire"), # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead # @@ -295,7 +295,7 @@ end # start prod and dev only config if config_env() != :test do - config :bonfire, Bonfire.Common.Repo, + config :bonfire_umbrella, Bonfire.Common.Repo, slow_query_ms: String.to_integer(System.get_env("DB_SLOW_QUERY_MS", "100")), # The timeout for establishing new connections (default: 5000) connect_timeout: String.to_integer(System.get_env("DB_CONNECT_TIMEOUT", "10000")), diff --git a/flavours/classic/config/test.exs b/flavours/classic/config/test.exs index c0adb39908..def4c6768d 100755 --- a/flavours/classic/config/test.exs +++ b/flavours/classic/config/test.exs @@ -30,7 +30,7 @@ config :logger, :console, truncate: :infinity # The MIX_TEST_PARTITION environment variable can be used # to provide built-in test partitioning in CI environment. # Run `mix help test` for more information. -config :bonfire, Bonfire.Common.Repo, +config :bonfire_umbrella, Bonfire.Common.Repo, pool: Ecto.Adapters.SQL.Sandbox, # show_sensitive_data_on_connection_error: true, # database: db,