From abb1ac98a719c173f604728b163b8c49912c6595 Mon Sep 17 00:00:00 2001 From: Cku Date: Mon, 1 Jun 2020 22:28:20 +0200 Subject: [PATCH 1/2] Add missing install instructions --- docs/contribute/development.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/contribute/development.md b/docs/contribute/development.md index b8de4c2ac..368a14af4 100644 --- a/docs/contribute/development.md +++ b/docs/contribute/development.md @@ -45,6 +45,30 @@ Run Mobilizon: ``` create extension if not exists postgis; ``` * Run migrations: `mix ecto.migrate`. + * Generate a Guardian secret with `mix guardian.gen.secret`: + ```bash + $ mix guardian.gen.secret + $ TTRcgYH/Y0rk8ph5fqExVWRWjK03cqymfTa70leljmLMsBChtm+6MM+pRrL76Io3 + ``` + * Create a `config/dev.secret.exs` file and add the Guardian config: + + ```elixir + import Config + + config :mobilizon, Mobilizon.Web.Auth.Guardian, + secret_key: "TTRcgYH/Y0rk8ph5fqExVWRWjK03cqymfTa70leljmLMsBChtm+6MM+pRrL76Io3" + + ``` + * Generate your first user with the `mix mobilizon.users.new` task + + ```bash + $ mix mobilizon.users.new john.doe@localhost.com + An user has been created with the following information: + - email: john.doe@localhost.com + - password: r/EKpKr5o7ngQY+r + - Role: user + The user will be prompted to create a new profile after login for the first time. + ``` * Start Phoenix endpoint with `mix phx.server`. The client development server will also automatically be launched and will reload on file change. Now you can visit [`localhost:4000`](http://localhost:4000) in your browser From 5829d240faba5db2ee1feb1a264a9d9aff839861 Mon Sep 17 00:00:00 2001 From: Cku Date: Wed, 3 Jun 2020 13:40:31 +0200 Subject: [PATCH 2/2] Add the --admin option --- docs/contribute/development.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/contribute/development.md b/docs/contribute/development.md index 368a14af4..8bb4f4b29 100644 --- a/docs/contribute/development.md +++ b/docs/contribute/development.md @@ -62,7 +62,7 @@ Run Mobilizon: * Generate your first user with the `mix mobilizon.users.new` task ```bash - $ mix mobilizon.users.new john.doe@localhost.com + $ mix mobilizon.users.new john.doe@localhost.com --admin An user has been created with the following information: - email: john.doe@localhost.com - password: r/EKpKr5o7ngQY+r @@ -78,4 +78,4 @@ and see the website (server *and* client) in action. ### Issues with argon2 when creating users. -This is because you installed deps through Docker and are now using Mobilizon without it, or the other way around. Just `rm -r deps/argon2_elixir` and trigger `mix deps.get` again. \ No newline at end of file +This is because you installed deps through Docker and are now using Mobilizon without it, or the other way around. Just `rm -r deps/argon2_elixir` and trigger `mix deps.get` again.