Skip to content

Commit e65caf5

Browse files
committed
Merge #740: Docs: fix command
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
2 parents 6864423 + 7f605b1 commit e65caf5

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/lib.rs

+13-5
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,28 @@
112112
//! && mkdir -p ./storage/database
113113
//! ```
114114
//!
115-
//! Then you can run it with: `./target/release/main`
115+
//! Then you can run it with: `./target/release/torrust-index`
116116
//!
117117
//! ## Run with docker
118118
//!
119119
//! You can run the index with a pre-built docker image:
120120
//!
121121
//! ```text
122-
//! mkdir -p ./storage/database \
122+
//! cd /tmp \
123+
//! && mkdir torrust-index \
124+
//! && cd torrust-index \
125+
//! && mkdir -p ./storage/index/lib/database \
126+
//! && mkdir -p ./storage/index/log \
127+
//! && mkdir -p ./storage/index/etc \
128+
//! && sqlite3 "./storage/index/lib/database/sqlite3.db" "VACUUM;" \
123129
//! && export USER_ID=1000 \
124130
//! && docker run -it \
125-
//! --user="$USER_ID" \
131+
//! --env USER_ID="$USER_ID" \
126132
//! --publish 3001:3001/tcp \
127-
//! --volume "$(pwd)/storage":"/app/storage" \
128-
//! torrust/index
133+
//! --volume "$(pwd)/storage/index/lib":"/var/lib/torrust/index" \
134+
//! --volume "$(pwd)/storage/index/log":"/var/log/torrust/index" \
135+
//! --volume "$(pwd)/storage/index/etc":"/etc/torrust/index" \
136+
//! torrust/index:develop
129137
//! ```
130138
//!
131139
//! For more information about using docker visit the [tracker docker documentation](https://github.com/torrust/torrust-index/tree/develop/docker).

src/services/authorization.rs

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ impl Service {
7474
///
7575
/// Will return an error if:
7676
/// - The user is not authorized to perform the action.
77-
7877
pub async fn authorize(&self, action: ACTION, maybe_user_id: Option<UserId>) -> std::result::Result<(), ServiceError> {
7978
let role = self.get_role(maybe_user_id).await;
8079

0 commit comments

Comments
 (0)