5.2 KiB · text History 4eee00d
import Config

# Configure your database
config :room_hermes,
       RoomHermes.Repo,
       username: "postgres",
       password: "postgres",
       hostname: "localhost",
       database: "room_sanctum_dev",
       show_sensitive_data_on_connection_error: true,
       port: 54321,
       # Matched to prod's POOL_SIZE. Both repos open a pool of this size at
       # startup, so the compose postgres is given headroom for it -- 50 each
       # against the default ceiling of 100 left nothing for psql.
       pool_size: 15

# 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 esbuild to bundle .js and .css sources.
config :room_hermes, RoomHermesWeb.Endpoint,
  # Binding to loopback ipv4 address prevents access from other machines.
  # Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
  http: [
    ip: {0, 0, 0, 0},
    port: 4001
  ],
  check_origin: false,
  code_reloader: true,
  debug_errors: true,
  secret_key_base: "SMW6jKy5qs4zSX6CsYm3MMgwLAlpulsSJu7DOhLQp/3APvYWRUEfX8kJXXdmMi2a"

# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# Mix task:
#
#     mix phx.gen.cert
#
# Note that this task requires Erlang/OTP 20 or later.
# Run `mix help phx.gen.cert` for more information.
#
# The `http:` config above can be replaced with:
#
#     https: [
#       port: 4001,
#       cipher_suite: :strong,
#       keyfile: "priv/cert/selfsigned_key.pem",
#       certfile: "priv/cert/selfsigned.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 :room_hermes,
       RoomHermesWeb.Endpoint,
       live_reload: [
         patterns: [
          ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
          ~r"priv/gettext/.*(po)$",
          ~r"lib/room_hermes/(live|views)/.*(ex)$",
          ~r"lib/room_hermes/templates/.*(eex)$",
          ~r"lib/room_sanctum_web/(live|components)/.*neex$"
        ]
       ]

# Configure your database
config :room_sanctum,
       RoomSanctum.Repo,
       username: "postgres",
       password: "postgres",
       hostname: "localhost",
       database: "room_sanctum_dev",
       port: 54321,
       show_sensitive_data_on_connection_error: true,
       pool_size: 15,
       types: RoomSanctum.PostgresTypes

# 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 esbuild to bundle .js and .css sources.
config :room_sanctum, RoomSanctumWeb.Endpoint,
  # Binding to loopback ipv4 address prevents access from other machines.
  # Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
  http: [ip: {0, 0, 0, 0}, port: 4002],
  check_origin: false,
  code_reloader: true,
  debug_errors: true,
  secret_key_base: "nR87VvTmXqWa9xbkvE2hYZpzHRgFG9QOOey5Wo76hyLBs9vP34a7pFdLLooZI6Xo",
  watchers: [
    # Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
    esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
    tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}
  ]

# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# Mix task:
#
#     mix phx.gen.cert
#
# Note that this task requires Erlang/OTP 20 or later.
# Run `mix help phx.gen.cert` for more information.
#
# The `http:` config above can be replaced with:
#
#     https: [
#       port: 4001,
#       cipher_suite: :strong,
#       keyfile: "priv/cert/selfsigned_key.pem",
#       certfile: "priv/cert/selfsigned.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 :room_sanctum, RoomSanctumWeb.Endpoint,
  live_reload: [
    patterns: [
      ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
      ~r"priv/gettext/.*(po)$",
      ~r"apps/room_sanctum/lib/room_sanctum_web/(live|views)/.*(ex)$",
      ~r"apps/room_sanctum/lib/room_sanctum_web/templates/.*(eex)$"
    ]
  ]

config :amqp,
  connections: [
    default: [url: "amqp://hermes:hermes@localhost:5672"]
  ],
  channels: [
    default: [connection: :default]
  ]

# How many clients are attached to an Ankyra is a question only the management
# API answers -- see RoomSanctum.Worker.Ankyra.count_mqtt_connections/1 for why
# AMQP cannot. Same broker, its HTTP port.
config :room_sanctum, :rabbit_mgmt,
  url: "http://localhost:15672",
  username: "hermes",
  password: "hermes",
  vhost: "/"

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n", level: :info

# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20

# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime