Skip to content

Commit

Permalink
Merge pull request #292 from pulibrary/mix-env
Browse files Browse the repository at this point in the history
Use Mix.env instead of setting up our own
  • Loading branch information
sdellis authored Jan 13, 2025
2 parents 999491f + 4351e78 commit cd05d36
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ config :dpul_collections, DpulCollectionsWeb.Endpoint,
]
]

# Set environment
config :dpul_collections, :current_env, :dev

config :dpul_collections, :basic_auth_username, "admin"
config :dpul_collections, :basic_auth_password, "admin"

Expand Down
3 changes: 0 additions & 3 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import Config
config :dpul_collections, DpulCollectionsWeb.Endpoint,
cache_static_manifest: "priv/static/cache_manifest.json"

# Set environment
config :dpul_collections, :current_env, :prod

# Enable dev routes - including mailbox preview and the dashboard.
config :dpul_collections, dev_routes: true

Expand Down
3 changes: 0 additions & 3 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ config :dpul_collections, DpulCollectionsWeb.Endpoint,
# In test we don't send emails.
config :dpul_collections, DpulCollections.Mailer, adapter: Swoosh.Adapters.Test

# Set environment
config :dpul_collections, :current_env, :test

# Set basic auth
config :dpul_collections, :basic_auth_username, "admin"
config :dpul_collections, :basic_auth_password, "test"
Expand Down
2 changes: 1 addition & 1 deletion lib/dpul_collections/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule DpulCollections.Application do
# Start to serve requests, typically the last entry
DpulCollectionsWeb.Endpoint,
DpulCollections.IndexMetricsTracker
] ++ environment_children(Application.fetch_env!(:dpul_collections, :current_env))
] ++ environment_children(Mix.env())

# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
Expand Down

0 comments on commit cd05d36

Please sign in to comment.