From 8477c224856b56f4cc47f570a51a668fe5eb03d4 Mon Sep 17 00:00:00 2001 From: Ivan Santana Quintana Date: Fri, 26 Apr 2024 12:34:47 +0100 Subject: [PATCH 1/3] Update lib.rs We updated the installation part of lib.rs and changed some other small bugs in the Configuration part. --- src/lib.rs | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 064f50eb6..14a814486 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -120,11 +120,19 @@ //! The default configuration expects a directory `./storage/tracker/lib/database` to be writable by the tracker process. //! //! By default the tracker uses `SQLite` and the database file name `data.db`. +//! +//! We will have to have a file to save the torrust-tracker, which we will call "torrust". +//! +//! ```text +//! mkdir torrust +//! cd torrust/ +//! ``` //! //! You only need the `tls` directory in case you are setting up SSL for the HTTP tracker or the tracker API. //! Visit [`HTTP`](crate::servers::http) or [`API`](crate::servers::apis) if you want to know how you can use HTTPS. //! //! ## Install from sources +//! //! //! ```text //! git clone https://github.com/torrust/torrust-tracker.git \ @@ -133,6 +141,15 @@ //! && mkdir -p ./storage/tracker/lib/database \ //! && mkdir -p ./storage/tracker/lib/tls //! ``` +//! +//! To run the tracker we will have to use the command "cargo run" this will have to compile data while being executed and after being compiled it will start running the tracker. +//! +//! ```text +//! cargo run +//! ``` +//! +//! If you want to configure your tracker further, you can go to the "Configuration" section to configure it to your liking. +//! //! //! ## Run with docker //! @@ -142,7 +159,7 @@ //! # Configuration //! //! In order to run the tracker you need to provide the configuration. If you run the tracker without providing the configuration, -//! the tracker will generate the default configuration the first time you run it. It will generate a `tracker.toml` file with +//! the tracker will generate the default configuration the first time you run it. It will generate a `Cargo.toml` file with //! in the root directory. //! //! The default configuration is: @@ -191,18 +208,18 @@ //! //! For more information about each service and options you can visit the documentation for the [torrust-tracker-configuration crate](https://docs.rs/torrust-tracker-configuration). //! -//! Alternatively to the `tracker.toml` file you can use one environment variable `TORRUST_TRACKER_CONFIG` to pass the configuration to the tracker: +//! Alternatively to the `Cargo.toml` file you can use one environment variable `TORRUST_TRACKER_CONFIG` to pass the configuration to the tracker: //! //! ```text -//! TORRUST_TRACKER_CONFIG=$(cat tracker.toml) +//! TORRUST_TRACKER_CONFIG=$(cat Cargo.toml) //! cargo run //! ``` //! -//! In the previous example you are just setting the env var with the contents of the `tracker.toml` file. +//! In the previous example you are just setting the env var with the contents of the `Cargo.toml` file. //! -//! The env var contains the same data as the `tracker.toml`. It's particularly useful in you are [running the tracker with docker](https://github.com/torrust/torrust-tracker/tree/develop/docker). +//! The env var contains the same data as the `Cargo.toml`. It's particularly useful in you are [running the tracker with docker](https://github.com/torrust/torrust-tracker/tree/develop/docker). //! -//! > NOTE: The `TORRUST_TRACKER_CONFIG` env var has priority over the `tracker.toml` file. +//! > NOTE: The `TORRUST_TRACKER_CONFIG` env var has priority over the `Cargo.toml` file. //! //! # Usage //! From 191f3bd77fc28e5d59e62ad172dc6023fbbf60ae Mon Sep 17 00:00:00 2001 From: Ivan Santana Quintana Date: Mon, 29 Apr 2024 09:47:09 +0100 Subject: [PATCH 2/3] update librs Update on the fmt charge --- src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 14a814486..e9f75c046 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -120,9 +120,9 @@ //! The default configuration expects a directory `./storage/tracker/lib/database` to be writable by the tracker process. //! //! By default the tracker uses `SQLite` and the database file name `data.db`. -//! +//! //! We will have to have a file to save the torrust-tracker, which we will call "torrust". -//! +//! //! ```text //! mkdir torrust //! cd torrust/ @@ -132,7 +132,7 @@ //! Visit [`HTTP`](crate::servers::http) or [`API`](crate::servers::apis) if you want to know how you can use HTTPS. //! //! ## Install from sources -//! +//! //! //! ```text //! git clone https://github.com/torrust/torrust-tracker.git \ @@ -141,15 +141,15 @@ //! && mkdir -p ./storage/tracker/lib/database \ //! && mkdir -p ./storage/tracker/lib/tls //! ``` -//! +//! //! To run the tracker we will have to use the command "cargo run" this will have to compile data while being executed and after being compiled it will start running the tracker. //! //! ```text //! cargo run //! ``` -//! -//! If you want to configure your tracker further, you can go to the "Configuration" section to configure it to your liking. -//! +//! +//! If you want to configure your tracker further, you can go to the "Configuration" section to configure it to your liking. +//! //! //! ## Run with docker //! From 23b72dffe4fc4d14f7f7fdc52578a7e2bd2cada4 Mon Sep 17 00:00:00 2001 From: Ivan Santana Quintana Date: Mon, 29 Apr 2024 11:37:31 +0100 Subject: [PATCH 3/3] update librs We update the library with new data --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e9f75c046..b348ddd27 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -142,7 +142,7 @@ //! && mkdir -p ./storage/tracker/lib/tls //! ``` //! -//! To run the tracker we will have to use the command "cargo run" this will have to compile data while being executed and after being compiled it will start running the tracker. +//! To run the tracker we will have to use the commands "cargo run" this will have to compile data while being executed and after being compiled it will start running the tracker. //! //! ```text //! cargo run