Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Dec 12, 2023
1 parent f7a15cc commit e1aedf8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
8 changes: 6 additions & 2 deletions flavours/classic/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ default_flavour = "classic"
flavour = System.get_env("FLAVOUR", default_flavour)
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
project_root = File.cwd!()
env = config_env()
#### Basic configuration

# You probably won't want to touch these. You might override some in
Expand All @@ -13,7 +14,7 @@ repo = Bonfire.Common.Repo
config :bonfire,
otp_app: :bonfire,
umbrella_otp_app: :bonfire_umbrella,
env: config_env(),
env: env,
project_path: project_root,
flavour: flavour,
flavour_path: flavour_path,
Expand Down Expand Up @@ -71,6 +72,7 @@ config :bonfire_umbrella, ecto_repos: repos
config :paginator, ecto_repos: repos
config :activity_pub, ecto_repos: repos
config :ecto_sparkles, :otp_app, :bonfire
config :ecto_sparkles, :env, env
config :ecto_sparkles, :umbrella_otp_app, :bonfire_umbrella
config :rauversion_extension, :repo_module, repo
config :activity_pub, :repo, repo
Expand Down Expand Up @@ -197,9 +199,11 @@ else
IO.puts("You could put any flavour-specific config at `#{flavour_config}`")
end

# federation library
import_config "activity_pub.exs"

# native app
#  import_config "native.exs"

# finally, append/override config based on env, which will override any config set above (including from imported files)
import_config "#{config_env()}.exs"
import_config "#{env}.exs"
32 changes: 16 additions & 16 deletions flavours/classic/config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,7 @@ config :bonfire, Bonfire.Web.Endpoint,
server: true,
debug_errors: false,
check_origin: false,
http: if(use_cowboy?, do: [protocol_options: [idle_timeout: 120_000]], else: []),
watchers: [
yarn: [
"watch.js",
cd: Path.expand("assets", File.cwd!())
],
yarn: [
"watch.css",
cd: Path.expand("assets", File.cwd!())
],
yarn: [
"watch.assets",
cd: Path.expand("assets", File.cwd!())
]
]
http: if(use_cowboy?, do: [protocol_options: [idle_timeout: 120_000]], else: [])

enable_code_reloading = System.get_env("HOT_CODE_RELOAD") != "0"

Expand Down Expand Up @@ -96,7 +82,7 @@ if enable_code_reloading do

# filename patterns that should trigger hots reloads of components/CSS/etc (only within the above dirs)
hot_patterns = [
~r"(_live)\.ex$",
~r"(_live|_view)\.ex$",
~r{(live|views|pages|components)/.*(ex|css)$},
~r".*(heex|leex|sface)$",
~r"priv/catalogue/.*(ex)$"
Expand All @@ -113,6 +99,20 @@ if enable_code_reloading do
notify: [
live_view: hot_patterns
]
],
watchers: [
yarn: [
"watch.js",
cd: Path.expand("assets", File.cwd!())
],
yarn: [
"watch.css",
cd: Path.expand("assets", File.cwd!())
],
yarn: [
"watch.assets",
cd: Path.expand("assets", File.cwd!())
]
]
end

Expand Down

0 comments on commit e1aedf8

Please sign in to comment.