Skip to content

Commit

Permalink
Merge #740: Docs: fix command
Browse files Browse the repository at this point in the history
7f605b1 fix: clippy errors (Jose Celano)
fdf62e9 docs: [#739] fix command to run with docker (Jose Celano)
15adcb9 docs: [#738] fix command (Jose Celano)

Pull request description:

  Fix the command to run the index from sources after compilation.

ACKs for top commit:
  josecelano:
    ACK 7f605b1

Tree-SHA512: f0b7161fc038db601da31b30f5a1dad4ecd90d1cfda7630526b612b6895e543ae15adbae91aef9274b420cb3ec172c3c914072df62121f2feb9b1d69f80f2da1
  • Loading branch information
josecelano committed Oct 2, 2024
2 parents 6864423 + 7f605b1 commit e65caf5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
18 changes: 13 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,28 @@
//! && mkdir -p ./storage/database
//! ```
//!
//! Then you can run it with: `./target/release/main`
//! Then you can run it with: `./target/release/torrust-index`
//!
//! ## Run with docker
//!
//! You can run the index with a pre-built docker image:
//!
//! ```text
//! mkdir -p ./storage/database \
//! cd /tmp \
//! && mkdir torrust-index \
//! && cd torrust-index \
//! && mkdir -p ./storage/index/lib/database \
//! && mkdir -p ./storage/index/log \
//! && mkdir -p ./storage/index/etc \
//! && sqlite3 "./storage/index/lib/database/sqlite3.db" "VACUUM;" \
//! && export USER_ID=1000 \
//! && docker run -it \
//! --user="$USER_ID" \
//! --env USER_ID="$USER_ID" \
//! --publish 3001:3001/tcp \
//! --volume "$(pwd)/storage":"/app/storage" \
//! torrust/index
//! --volume "$(pwd)/storage/index/lib":"/var/lib/torrust/index" \
//! --volume "$(pwd)/storage/index/log":"/var/log/torrust/index" \
//! --volume "$(pwd)/storage/index/etc":"/etc/torrust/index" \
//! torrust/index:develop
//! ```
//!
//! For more information about using docker visit the [tracker docker documentation](https://github.com/torrust/torrust-index/tree/develop/docker).
Expand Down
1 change: 0 additions & 1 deletion src/services/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ impl Service {
///
/// Will return an error if:
/// - The user is not authorized to perform the action.

pub async fn authorize(&self, action: ACTION, maybe_user_id: Option<UserId>) -> std::result::Result<(), ServiceError> {
let role = self.get_role(maybe_user_id).await;

Expand Down

0 comments on commit e65caf5

Please sign in to comment.