diff --git a/config/config.exs b/config/config.exs index 5b909f1..ff936c0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,59 +1,54 @@ -# This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -# -# This configuration file is loaded before any dependency and -# is restricted to this project. -use Mix.Config +import Config config :logger, level: :debug config :logger, :console, format: "$date $time [$level$levelpad] $metadata$message\n", metadata: :all config :phoenix, :json_library, Jason # General application configuration config :nola, namespace: Nola config :nola, :data_path, "priv" config :nola, :brand, name: "Nola", source_url: "https://phab.random.sh/source/Nola/" config :ex_aws, region: "us-east-1", host: "s3.wasabisys.com", s3: [ host: "s3.wasabisys.com", region: "us-east-1", scheme: "https://" ] # Configures the endpoint config :nola, NolaWeb.Endpoint, url: [host: "localhost"], secret_key_base: "cAFb7x2p/D7PdV8/C6Os18uygoD0FVQh3efNEFc5+5L529q3dofZtZye/BG12MRZ", render_errors: [view: NolaWeb.ErrorView, accepts: ~w(html json)], server: true, live_view: [signing_salt: "CHANGE_ME_FFS"], pubsub: [name: Nola.PubSub, adapter: Phoenix.PubSub.PG2] config :mime, :types, %{"text/event-stream" => ["sse"]} config :nola, :lastfm, api_key: "x", api_secret: "x" config :nola, :youtube, api_key: "x", invidious: "yewtu.be" config :mnesia, dir: '.mnesia/#{Mix.env}/#{node()}' # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env}.exs" diff --git a/config/dev.exs b/config/dev.exs index a2b97f8..946e381 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,51 +1,51 @@ -use Mix.Config +import Config # For development, we disable any cache and enable # debugging and code reloading. # # The watchers configuration can be used to run external # watchers to your application. For example, we use it # with brunch.io to recompile .js and .css sources. config :nola, NolaWeb.Endpoint, http: [port: 4012, ip: {0,0,0,0}], debug_errors: true, code_reloader: true, check_origin: false # ## SSL Support # # In order to use HTTPS in development, a self-signed # certificate can be generated by running the following # command from your terminal: # # openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout priv/server.key -out priv/server.pem # # The `http:` config above can be replaced with: # # https: [port: 4000, keyfile: "priv/server.key", certfile: "priv/server.pem"], # # If desired, both `http:` and `https:` keys can be # configured to run both http and https servers on # different ports. # Watch static and templates for browser reloading. config :nola, NolaWeb.Endpoint, live_reload: [ patterns: [ ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$}, ~r{priv/gettext/.*(po)$}, ~r{lib/nola_web/controllers/.*(ex)$}, ~r{lib/nola_web/views/.*(ex)$}, ~r{lib/nola_web/templates/.*(eex)$} ] ], watchers: [ make: ["-C", "assets", "watch"] ] # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. config :phoenix, :stacktrace_depth, 20 import_config "secret.exs" import_config "dev.secret.exs" diff --git a/config/prod.exs b/config/prod.exs index 2acf04f..4243a83 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -1,13 +1,13 @@ -use Mix.Config +import Config config :nola, NolaWeb.Endpoint, http: [ip: {0,0,0,0}, port: 4000] config :logger_json, :backend, metadata: :all config :logger, backends: [LoggerJSON] import_config "secret.exs" import_config "prod.secret.exs" diff --git a/config/test.exs b/config/test.exs index 618cbd5..6048459 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,10 +1,10 @@ -use Mix.Config +import Config # We don't run a server during test. If one is required, # you can enable the server option below. config :nola, NolaWeb.Endpoint, http: [port: 4001], server: false # Print only warnings and errors during test config :logger, level: :warn