mix imison.install (Imison v0.1.0)

Copy Markdown View Source

Installs Imison in a Phoenix app: its config, its place in the supervision tree, the migration that creates its tables and the dashboard route.

Example

mix imison.install
mix ecto.migrate

mix igniter.install imison adds the dependency and runs this task in one step.

Changes

  • config/config.exs: repo, pubsub (the endpoint's pubsub_server) and, when the app has a Mailer module, mailer
  • config/runtime.exs: the production login, from the IMISON_USER and IMISON_PASSWORD environment variables
  • config/dev.exs: the login admin with a password generated at install time
  • config/test.exs: enabled: false and a test login
  • the application's children: {Imison, Application.fetch_env!(:my_app, Imison)} after the repo and the PubSub
  • a migration add_imison calling Imison.Migration
  • the router: import Imison.Web.Router and imison_dashboard "/errors" in a scope piped through :browser
  • .formatter.exs: :imison in import_deps

A change that is already there is skipped, so running the task again changes nothing.