config.exs (2507B)
1 # This file is responsible for configuring your application 2 # and its dependencies with the aid of the Config module. 3 # 4 # This configuration file is loaded before any dependency and 5 # is restricted to this project. 6 7 # General application configuration 8 import Config 9 10 config :daily_tracker, :scopes, 11 user: [ 12 default: true, 13 module: DailyTracker.Accounts.Scope, 14 assign_key: :current_scope, 15 access_path: [:user, :id], 16 schema_key: :user_id, 17 schema_type: :id, 18 schema_table: :users, 19 test_data_fixture: DailyTracker.AccountsFixtures, 20 test_setup_helper: :register_and_log_in_user 21 ] 22 23 config :daily_tracker, 24 ecto_repos: [DailyTracker.Repo], 25 generators: [timestamp_type: :utc_datetime] 26 27 # Configure the endpoint 28 config :daily_tracker, DailyTrackerWeb.Endpoint, 29 url: [host: "localhost"], 30 adapter: Bandit.PhoenixAdapter, 31 render_errors: [ 32 formats: [html: DailyTrackerWeb.ErrorHTML, json: DailyTrackerWeb.ErrorJSON], 33 layout: false 34 ], 35 pubsub_server: DailyTracker.PubSub, 36 live_view: [signing_salt: "wLCa0CAG"] 37 38 # Configure the mailer 39 # 40 # By default it uses the "Local" adapter which stores the emails 41 # locally. You can see the emails in your browser, at "/dev/mailbox". 42 # 43 # For production it's recommended to configure a different adapter 44 # at the `config/runtime.exs`. 45 config :daily_tracker, DailyTracker.Mailer, adapter: Swoosh.Adapters.Local 46 47 # Configure esbuild (the version is required) 48 config :esbuild, 49 version: "0.25.4", 50 path: System.get_env("MIX_ESBUILD_PATH"), 51 daily_tracker: [ 52 args: 53 ~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), 54 cd: Path.expand("../assets", __DIR__), 55 env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} 56 ] 57 58 # Configure tailwind (the version is required) 59 config :tailwind, 60 version: "4.3.0", 61 path: System.get_env("TAILWIND_PATH") || "tailwindcss", 62 daily_tracker: [ 63 args: ~w( 64 --input=assets/css/app.css 65 --output=priv/static/assets/css/app.css 66 ), 67 cd: Path.expand("..", __DIR__) 68 ] 69 70 # Configure Elixir's Logger 71 config :logger, :default_formatter, 72 format: "$time $metadata[$level] $message\n", 73 metadata: [:request_id] 74 75 # Use Jason for JSON parsing in Phoenix 76 config :phoenix, :json_library, Jason 77 78 # Import environment specific config. This must remain at the bottom 79 # of this file so it overrides the configuration defined above. 80 import_config "#{config_env()}.exs"