refactor: PORTFOLIO prefix for all envs

This commit is contained in:
EETagent 2022-12-14 17:57:49 +01:00
parent ed3d0c3549
commit fa54166f2f
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ impl sea_orm_rocket::Pool for SeaOrmPool {
async fn init(_figment: &Figment) -> Result<Self, Self::Error> {
dotenv::dotenv().ok();
let database_url = std::env::var("DATABASE_URL").unwrap();
let database_url = std::env::var("PORTFOLIO_DATABASE_URL").unwrap();
let mut options: ConnectOptions = database_url.into();
options
.max_connections(1024)

View file

@ -127,7 +127,7 @@ impl PortfolioService {
// Get root path or local directory
fn get_file_store_path() -> PathBuf {
dotenv::dotenv().ok();
Path::new(&std::env::var("STORE_PATH").unwrap_or_else(|_| "".to_string())).to_path_buf()
Path::new(&std::env::var("PORTFOLIO_STORE_PATH").unwrap_or_else(|_| "".to_string())).to_path_buf()
}
/// Writes file to desired location