|
1 | 1 | //! Configuration management for deployment settings |
2 | 2 | //! |
3 | | -//! This module provides the `Config` struct which centralizes all deployment-related |
4 | | -//! configuration including file paths, service connections, SSH credentials, |
5 | | -//! and runtime behavior settings. |
| 3 | +//! This module provides the `Config` struct which manages essential file system |
| 4 | +//! paths for the deployment process including template sources and build outputs. |
6 | 5 | //! |
7 | | -//! ## Key Configuration Areas |
| 6 | +//! ## Current Configuration Areas |
8 | 7 | //! |
9 | | -//! - SSH credentials and connection settings |
10 | 8 | //! - File system paths for templates and build outputs |
11 | | -//! - Deployment behavior flags (cleanup, verbosity, etc.) |
12 | | -//! - Tool-specific configuration (Ansible, `OpenTofu`) |
| 9 | +//! - Project root directory for resolving relative paths |
| 10 | +//! |
| 11 | +//! ## Path Relationships |
| 12 | +//! |
| 13 | +//! Typically, the paths have this relationship: |
| 14 | +//! - `project_root`: `/path/to/torrust-tracker-deploy` |
| 15 | +//! - `templates_dir`: `{project_root}/templates` |
| 16 | +//! - `build_dir`: `{project_root}/build` |
13 | 17 | //! |
14 | 18 | //! The configuration is typically created once at deployment start and passed |
15 | | -//! throughout the system to ensure consistent settings across all components. |
| 19 | +//! throughout the system to ensure consistent path resolution across all components. |
16 | 20 |
|
17 | 21 | use std::path::PathBuf; |
18 | 22 |
|
@@ -51,9 +55,9 @@ impl Config { |
51 | 55 | /// # use std::path::PathBuf; |
52 | 56 | /// # use torrust_tracker_deploy::config::Config; |
53 | 57 | /// let config = Config::new( |
54 | | - /// PathBuf::from("templates"), |
55 | | - /// PathBuf::from("/path/to/project"), |
56 | | - /// PathBuf::from("/path/to/project/build"), |
| 58 | + /// PathBuf::from("/home/user/project/templates"), |
| 59 | + /// PathBuf::from("/home/user/project"), |
| 60 | + /// PathBuf::from("/home/user/project/build"), |
57 | 61 | /// ); |
58 | 62 | /// ``` |
59 | 63 | #[must_use] |
|
0 commit comments