import Config config :localiserd, Localiser.Repo, database: Path.expand("../priv/db/localiser.db", Path.dirname(__ENV__.file)), pool_size: 5 config :localiserd, ecto_repos: [Localiser.Repo] config :localiserd, Localiser.Web.Endpoint, adapter: Bandit.PhoenixAdapter, http: [port: 4000], secret_key_base: System.get_env("SECRET_KEY_BASE") || "localiser_dev_secret_key_base_change_in_prod_min64chars!!", server: true, render_errors: [formats: [json: Localiser.ErrorView], layout: false] config :localiserd, :jwt_secret, System.get_env("JWT_SECRET") || "localiser_dev_jwt_secret_change_in_prod!!" config :mdns_lite, hosts: ["localiser"], ttl: 120, services: [ # advertise this service on the local network for auto-discovery by clients %{ id: :localiserd, protocol: "localiserd", transport: "tcp", # todo: grab port from config port: 4000 }, # also advertise the MQTT broker for direct discovery by new sensors %{ id: :mqtt, protocol: "mqtt", transport: "tcp", port: Application.compile_env(:localiser, :mqtt_port, 1883) } ]