We should allow the users to override only config options when they don't want to use default values.
Settings {
log_level: None,
website: Website {
name: "Torrust",
},
tracker: Tracker {
url: Url {
scheme: "udp",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"localhost",
),
),
port: Some(
6969,
),
path: "",
query: None,
fragment: None,
},
mode: Public,
api_url: Url {
scheme: "http",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"localhost",
),
),
port: Some(
1212,
),
path: "/",
query: None,
fragment: None,
},
token: ApiToken(
"MyAccessToken",
),
token_valid_seconds: 7257600,
},
net: Network {
port: 3001,
base_url: None,
tsl: None,
},
auth: Auth {
email_on_signup: Optional,
min_password_length: 6,
max_password_length: 64,
secret_key: SecretKey(
"MaxVerstappenWC2021",
),
},
database: Database {
connect_url: Url {
scheme: "sqlite",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"data.db",
),
),
port: None,
path: "",
query: Some(
"mode=rwc",
),
fragment: None,
},
},
mail: Mail {
email_verification_enabled: false,
from: Mailbox {
name: None,
email: Address {
serialized: "example@email.com",
at_start: 7,
},
},
reply_to: Mailbox {
name: None,
email: Address {
serialized: "noreply@email.com",
at_start: 7,
},
},
username: "",
password: "",
server: "",
port: 25,
},
image_cache: ImageCache {
max_request_timeout_ms: 1000,
capacity: 128000000,
entry_size_limit: 4000000,
user_quota_period_seconds: 3600,
user_quota_bytes: 64000000,
},
api: Api {
default_torrent_page_size: 10,
max_torrent_page_size: 30,
},
tracker_statistics_importer: TrackerStatisticsImporter {
torrent_info_update_interval: 3600,
port: 3002,
},
}
Parent issue: #586
We should allow the users to override only config options when they don't want to use default values.
Current default config in toml format
Current default config in type debug ouput