Skip to content

Latest commit

 

History

History
75 lines (47 loc) · 2.05 KB

installation.md

File metadata and controls

75 lines (47 loc) · 2.05 KB

Installation

Objective

Install Beacon and Beacon LiveAdmin in a new Phoenix LiveView application to enable running and managing sites.

Notes

  • If you already have a Phoenix LiveView application that meets the minimum requirements for Beacon and Beacon LiveAdmin, you can skip to step 6.
  • Beacon LiveAdmin can be installed in a separated application in a cluster environment but such advanced setup is not covered in this guide.

Steps

  1. Install Elixir v1.14 or later

Check out the official Elixir install guide for more info.

  1. Update Hex
mix local.hex

If that command fails or Elixir version is outdated, please follow the Elixir Install guide to set up your environment correctly.

  1. Install Phoenix v1.7 or later
mix archive.install hex phx_new

Check out the official Phoenix install guide for more info.

  1. Setup a PostgreSQL database

We recommend using PostgreSQL that's officially supported, make sure it's installed and running.

  1. Generate a new Phoenix application
mix phx.new --install my_app

Note that Beacon supports Umbrella applications as well.

  1. Change the existing :floki dependency to make it available in all environments
- {:floki, ">= 0.30.0", only: :test},
+ {:floki, ">= 0.30.0"},
  1. Add :beacon and :beacon_live_admin dependencies to mix.exs
+ {:beacon, "~> 0.1.0", override: true},
+ {:beacon_live_admin, ">= 0.0.0"},
  1. Add :beacon and :beacon_live_admin into :import_deps in file .formatter.exs
- import_deps: [:ecto, :ecto_sql, :phoenix],
+ import_deps: [:ecto, :ecto_sql, :phoenix, :beacon, :beacon_live_admin],
  1. Install deps
mix deps.get

Next Steps

Beacon is installed but you have no sites yet. Follow the Your First Site guide to setup one and get familiar with Beacon.