Update the README to add guide how to create an admin user.
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -11,6 +11,16 @@
|
|||||||
update the PHX_HOST to your domain name
|
update the PHX_HOST to your domain name
|
||||||
- run `docker compose up -d`
|
- run `docker compose up -d`
|
||||||
- run migrations `docker exec -it dbi bin/migrate`
|
- run migrations `docker exec -it dbi bin/migrate`
|
||||||
|
- open the url (`PHX_HOST`) in a browser
|
||||||
|
register a user
|
||||||
|
- run the commands to promote an user to the admin.
|
||||||
|
change `admin@example.com` to your email.
|
||||||
|
```shell
|
||||||
|
docker exec -it dbi bin/decentralised_book_index remote
|
||||||
|
DecentralisedBookIndex.Accounts.User.get_by_email!("admin@example.com", authorize?: false) \
|
||||||
|
|> DecentralisedBookIndex.Accounts.User.set_role(:admin, authorize?: false)
|
||||||
|
```
|
||||||
|
close the terminal with `Ctrl + c` and `a`.
|
||||||
|
|
||||||
# Author
|
# Author
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user