fix: update output directory paths in Docker configuration

This commit is contained in:
monosans
2026-01-15 18:48:39 +03:00
parent 41e0c7b1d1
commit 4ad78aead1
3 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ services:
init: true
volumes:
- proxy_scraper_checker_cache:/home/app/.cache/proxy_scraper_checker
- ./out:/home/app/.local/share/proxy_scraper_checker
- ./out:/app/out
- ./config.toml:/app/config.toml
volumes:
proxy_scraper_checker_cache:
+1 -1
View File
@@ -46,7 +46,7 @@ user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTM
[output]
# Output directory (Docker overrides this to /home/app/.local/share/proxy_scraper_checker via volume mount)
# Output directory (Docker overrides this to /app/out via volume mount)
path = "./out"
# Sort proxies by response time (true) or by IP address (false)
+2 -6
View File
@@ -5,7 +5,7 @@ use std::{
time::Duration,
};
use color_eyre::eyre::{OptionExt as _, WrapErr as _};
use color_eyre::eyre::WrapErr as _;
use crate::{
HashMap, http::BasicAuth, proxy::ProxyType, raw_config, utils::is_docker,
@@ -70,11 +70,7 @@ async fn get_output_path(
raw_config: &raw_config::RawConfig,
) -> crate::Result<PathBuf> {
let output_path = if is_docker().await {
let mut path = tokio::task::spawn_blocking(dirs::data_local_dir)
.await?
.ok_or_eyre("failed to get user's local data directory")?;
path.push(APP_DIRECTORY_NAME);
path
"./out".into()
} else {
raw_config.output.path.clone()
};