Corrected storage issue by adding a docker volume for file persistance
This commit is contained in:
parent
e44bc95a4e
commit
38532056e5
4 changed files with 30 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
|
|||
pub fn storage_dir() -> PathBuf {
|
||||
std::env::var("ASTRA_STORAGE")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| std::env::current_dir().unwrap().join("storage"))
|
||||
.unwrap_or_else(|_| PathBuf::from("/app/storage"))
|
||||
}
|
||||
|
||||
pub fn ensure_storage_dir() -> Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue