feat(server): argon2_elixir dep + dashboard_password_hash config

This commit is contained in:
Carsten 2026-04-21 22:48:07 +02:00
parent 663f7a6113
commit 58f22243a5
4 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,17 @@
import Config
if config_env() in [:prod, :dev] do
hash =
System.get_env("DASHBOARD_PASSWORD_HASH") ||
raise """
DASHBOARD_PASSWORD_HASH not set.
Generate one with:
mix run -e 'IO.puts(Argon2.hash_pwd_salt("your-password"))'
"""
config :server, :dashboard_password_hash, hash
end
# config/runtime.exs is executed for all environments, including
# during releases. It is executed after compilation and before the
# system starts, so it is typically used to load production configuration

View file

@ -28,3 +28,5 @@ config :phoenix_live_view,
enable_expensive_runtime_checks: true
config :bcrypt_elixir, :log_rounds, 4
config :argon2_elixir, t_cost: 1, m_cost: 8