Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation docs #821

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"We need a folder to clone the repository".

Folder not file.

//!
//! ```text
//! mkdir torrust
//! cd torrust/
//! ```
Comment on lines +126 to +129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the indentation.

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 \
Expand All @@ -134,6 +142,15 @@
//! && mkdir -p ./storage/tracker/lib/tls
//! ```
//!
//! 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

Check warning on line 147 in src/lib.rs

View check run for this annotation

Codecov / codecov/patch

src/lib.rs#L147

Added line #L147 was not covered by tests
//! 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
Expand All @@ -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

Check warning on line 162 in src/lib.rs

View check run for this annotation

Codecov / codecov/patch

src/lib.rs#L162

Added line #L162 was not covered by tests
//! in the root directory.
Comment on lines 161 to 163
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ivan9989-pkj, this is not true anymore. Now, the tracker uses the default config file ./share/default/config/tracker.development.sqlite3.toml.

You can use any name for the config file, but we usually use this name tracker.toml or config.toml but never Cargo.toml. That's the Rust crate config file.

//!
//! The default configuration is:
Expand Down Expand Up @@ -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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

//!
//! ```text
//! TORRUST_TRACKER_CONFIG=$(cat tracker.toml)
//! TORRUST_TRACKER_CONFIG=$(cat Cargo.toml)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

//!
//! 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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

//!
//! > 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

//!
//! # Usage
//!
Expand Down
Loading