fix: update output directory paths in Docker configuration
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user