You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
KKlochko 18dbcadce6
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
Update the version.
8 months ago
assets Update the DarkModeSwitcher component to change the icon order. 8 months ago
config Update Oban configuration to prune jobs which older than 7 days. 9 months ago
examples/nginx Add an example of the nginx configuration. 9 months ago
lib Fix the key mismatch to solve FOUC. 8 months ago
priv Update to allow a Book to have no Publisher. 8 months ago
rel/overlays/bin Add the docker release configuration. 10 months ago
test Update the generator for BookIds. 8 months ago
.dockerignore Add the docker release configuration. 10 months ago
.drone.yml Update the CI/CD configuration to build the image. 9 months ago
.env.example Add the configuration for the email. 10 months ago
.env_db.example Add the docker-compose configuration and examples of env files. 10 months ago
.formatter.exs Add Oban for background jobs. 10 months ago
.gitignore Update the .gitignore. 11 months ago
.igniter.exs Init the project. 12 months ago
COPYING Add the license. 9 months ago
Dockerfile Update the mix and docker image configuration to install js assets. 10 months ago
README.md Update the README to add step to choose a pre-build or build image. 9 months ago
docker-compose.yml Update the docker-compose to use the pre-built image by default. 9 months ago
mix.exs Update the version. 8 months ago
mix.lock Add Req to the dependencies. 8 months ago

README.md

DecentralisedBookIndex

DecentralisedBookIndex is a web-server to manage the book metadata in the decentralise manner.

Getting started

  • clone this repository
  • copy .env.example file and save as .env
  • copy .env_db.example file and save as .env_db
  • change the values in .env and .env_db you can use mix phx.gen.secret to generate secrets. update the PHX_HOST to your domain name.
  • if you don't want to pull the pre-built container
    • uncomment the part to build the image in the docker-compose.yaml file
    • comment the image part to avoid pulling.
  • run docker compose up -d
  • run migrations docker exec -it dbi bin/migrate
  • open the url (PHX_HOST) in a browser. register a user.
  • install nginx for as a reverse proxy
  • configure the web-site config for nginx change example.com to your domain. copy example config from examples/nginx/example.com.conf to /etc/nginx/sites-available. rename the file to your domain and change the domain within the file. enable the web-site with command ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/.
  • run the commands to promote an user to the admin. change admin@example.com to your email.
    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

Kostiantyn Klochko (c) 2025

License

Under the GNU Affero General Public License v3.0.