diff --git a/src/lib.rs b/src/lib.rs index 064f50eb6..9d25a471b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,11 +121,19 @@ //! //! 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 \ //! && cd torrust-tracker \ @@ -134,6 +142,15 @@ //! && 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 //! //! You can run the tracker with a pre-built docker image. Please refer to the @@ -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 //!