diff --git a/config/config.exs b/config/config.exs index de79c34d..608dd12e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -10,23 +10,23 @@ import Config # Configure Mix tasks and generators -config :athena, +config :athena_logistics, ecto_repos: [Athena.Repo], - generators: [context_app: :athena, binary_id: true] + generators: [context_app: :athena_logistics, binary_id: true] -config :athena, Athena.Repo, +config :athena_logistics, Athena.Repo, migration_primary_key: [id: :uuid, type: :binary_id], migration_foreign_key: [column: :id, type: :binary_id], migration_timestamps: [type: :utc_datetime_usec] # Configures the endpoint -config :athena, AthenaWeb.Endpoint, +config :athena_logistics, AthenaWeb.Endpoint, url: [host: "localhost"], render_errors: [view: AthenaWeb.ErrorView, accepts: ~w(html json)], pubsub_server: Athena.PubSub, live_view: [signing_salt: "rEImWHdz"] -config :athena, AthenaWeb.Gettext, default_locale: "de" +config :athena_logistics, AthenaWeb.Gettext, default_locale: "de" # Configures Elixir's Logger config :logger, :console, diff --git a/config/dev.exs b/config/dev.exs index 28b03d0a..a38e597a 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,8 +1,8 @@ import Config -config :athena, Athena.Repo, show_sensitive_data_on_connection_error: true +config :athena_logistics, Athena.Repo, show_sensitive_data_on_connection_error: true -config :athena, AthenaWeb.Endpoint, +config :athena_logistics, AthenaWeb.Endpoint, debug_errors: true, code_reloader: true, check_origin: false, diff --git a/config/prod.exs b/config/prod.exs index 09f16d9e..4e247201 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -1,3 +1,3 @@ import Config -config :athena, AthenaWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json" +config :athena_logistics, AthenaWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json" diff --git a/config/runtime.exs b/config/runtime.exs index ad30fd63..259f80dc 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -2,7 +2,7 @@ import Config case config_env() do :prod -> - config :athena, AthenaWeb.Endpoint, server: true + config :athena_logistics, AthenaWeb.Endpoint, server: true _env -> nil @@ -42,7 +42,7 @@ database_connection_params = [url: url] end -config :athena, +config :athena_logistics, Athena.Repo, [ ssl: database_ssl, @@ -63,7 +63,7 @@ port = ) ) -config :athena, AthenaWeb.Endpoint, +config :athena_logistics, AthenaWeb.Endpoint, url: [ host: System.get_env("EXTERNAL_HOST", "localhost"), port: System.get_env("EXTERNAL_PORT", "#{port}"), @@ -92,7 +92,7 @@ config :logger, ) ) -config :athena, Plug.BasicAuth, +config :athena_logistics, Plug.BasicAuth, username: System.get_env("BASIC_AUTH_USERNAME", "admin"), password: System.get_env("BASIC_AUTH_PASSWORD", "admin"), realm: System.get_env("BASIC_AUTH_REALM", "Admin Area") diff --git a/config/test.exs b/config/test.exs index c89c0171..fc41743e 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,7 +1,7 @@ import Config -config :athena, Athena.Repo, pool: Ecto.Adapters.SQL.Sandbox +config :athena_logistics, Athena.Repo, pool: Ecto.Adapters.SQL.Sandbox -config :athena, AthenaWeb.Endpoint, +config :athena_logistics, AthenaWeb.Endpoint, server: false, debug_errors: true diff --git a/lib/athena/release.ex b/lib/athena/release.ex index 99162b53..b1fa1132 100644 --- a/lib/athena/release.ex +++ b/lib/athena/release.ex @@ -4,7 +4,7 @@ defmodule Athena.Release do installed. """ - @app :athena + @app :athena_logistics def migrate do load_app() diff --git a/lib/athena/repo.ex b/lib/athena/repo.ex index e291ccf2..0ae0bf83 100644 --- a/lib/athena/repo.ex +++ b/lib/athena/repo.ex @@ -1,5 +1,5 @@ defmodule Athena.Repo do use Ecto.Repo, - otp_app: :athena, + otp_app: :athena_logistics, adapter: Ecto.Adapters.Postgres end diff --git a/lib/athena/telemetry.ex b/lib/athena/telemetry.ex index 52af5300..798cf585 100644 --- a/lib/athena/telemetry.ex +++ b/lib/athena/telemetry.ex @@ -61,7 +61,7 @@ defmodule Athena.Telemetry do reporter_options: [ buckets: power_two_durations(-8, 16) ], - event_name: [:athena, :repo, :query], + event_name: [:athena_logistics, :repo, :query], measurement: :total_time, unit: {:native, :millisecond} ), @@ -70,7 +70,7 @@ defmodule Athena.Telemetry do reporter_options: [ buckets: power_two_durations(-8, 16) ], - event_name: [:athena, :repo, :query], + event_name: [:athena_logistics, :repo, :query], measurement: :decode_time, unit: {:native, :millisecond} ), @@ -79,7 +79,7 @@ defmodule Athena.Telemetry do reporter_options: [ buckets: power_two_durations(-8, 16) ], - event_name: [:athena, :repo, :query], + event_name: [:athena_logistics, :repo, :query], measurement: :query_time, unit: {:native, :millisecond} ), @@ -88,7 +88,7 @@ defmodule Athena.Telemetry do reporter_options: [ buckets: power_two_durations(-8, 16) ], - event_name: [:athena, :repo, :query], + event_name: [:athena_logistics, :repo, :query], measurement: :queue_time, unit: {:native, :millisecond} ), @@ -97,7 +97,7 @@ defmodule Athena.Telemetry do reporter_options: [ buckets: power_two_durations(-8, 16) ], - event_name: [:athena, :repo, :query], + event_name: [:athena_logistics, :repo, :query], measurement: :idle_time, unit: {:native, :millisecond} ), diff --git a/lib/athena_web/endpoint.ex b/lib/athena_web/endpoint.ex index 5129a746..16be1860 100644 --- a/lib/athena_web/endpoint.ex +++ b/lib/athena_web/endpoint.ex @@ -1,5 +1,5 @@ defmodule AthenaWeb.Endpoint do - use Phoenix.Endpoint, otp_app: :athena + use Phoenix.Endpoint, otp_app: :athena_logistics use Absinthe.Phoenix.Endpoint # The session will be stored in the cookie and signed, @@ -26,7 +26,7 @@ defmodule AthenaWeb.Endpoint do # when deploying your static files in production. plug Plug.Static, at: "/", - from: :athena, + from: :athena_logistics, gzip: false, only: ~w(css fonts images js favicon.ico robots.txt) @@ -36,7 +36,7 @@ defmodule AthenaWeb.Endpoint do socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket plug Phoenix.LiveReloader plug Phoenix.CodeReloader - plug Phoenix.Ecto.CheckRepoStatus, otp_app: :athena + plug Phoenix.Ecto.CheckRepoStatus, otp_app: :athena_logistics end plug Phoenix.LiveDashboard.RequestLogger, diff --git a/lib/athena_web/gettext.ex b/lib/athena_web/gettext.ex index 723f443a..75a53655 100644 --- a/lib/athena_web/gettext.ex +++ b/lib/athena_web/gettext.ex @@ -20,5 +20,5 @@ defmodule AthenaWeb.Gettext do See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. """ - use Gettext, otp_app: :athena + use Gettext, otp_app: :athena_logistics end diff --git a/lib/athena_web/router.ex b/lib/athena_web/router.ex index 4f091ca5..ede60793 100644 --- a/lib/athena_web/router.ex +++ b/lib/athena_web/router.ex @@ -101,5 +101,5 @@ defmodule AthenaWeb.Router do end defp auth(conn, _opts), - do: Plug.BasicAuth.basic_auth(conn, Application.fetch_env!(:athena, Plug.BasicAuth)) + do: Plug.BasicAuth.basic_auth(conn, Application.fetch_env!(:athena_logistics, Plug.BasicAuth)) end diff --git a/mix.exs b/mix.exs index 0bb94a0a..d9106951 100644 --- a/mix.exs +++ b/mix.exs @@ -3,7 +3,7 @@ defmodule Athena.MixProject do def project do [ - app: :athena, + app: :athena_logistics, version: "0.0.0", elixir: "~> 1.13", elixirc_paths: elixirc_paths(Mix.env()), diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index ecbe1c40..7f989a56 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -36,7 +36,7 @@ defmodule AthenaWeb.ConnCase do setup do Gettext.put_locale(AthenaWeb.Gettext, "en") - config = Application.fetch_env!(:athena, Plug.BasicAuth) + config = Application.fetch_env!(:athena_logistics, Plug.BasicAuth) header_content = "Basic " <> Base.encode64("#{config[:username]}:#{config[:password]}")