diff --git a/compose.yml b/compose.yml index fba2d8f..47bc7da 100644 --- a/compose.yml +++ b/compose.yml @@ -5,6 +5,5 @@ services: env_file: - .env volumes: - - ./processed_items.db:/usr/app/processed_items.db -# - ./processed.json:/app/processed.json # if you need to migration + - ./data:/usr/app/data - ./rss.toml:/usr/app/rss.toml diff --git a/src/main.rs b/src/main.rs index 00b1149..f6f0d9a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,10 +28,10 @@ async fn main() -> Result<()> { let config: FullConfig = toml::from_str(&rss_toml_content)?; let config = Arc::new(config); - let storage = Arc::new(Storage::new("processed_items.db")?); + let storage = Arc::new(Storage::new("./data/processed_items.db")?); // Migration from old processed.json if it exists - let old_processed_path = "../memos-rss/processed.json"; + let old_processed_path = "./data/processed.json"; if std::path::Path::new(old_processed_path).exists() { println!("Found old processed.json, migrating data..."); let content = std::fs::read_to_string(old_processed_path)?;