From aa343f35444c7818c3349048a75104676da9c157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 22 Dec 2021 19:19:26 +0100 Subject: [PATCH] You can now use a environment variable for database name --- discord_rss_bot/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord_rss_bot/main.py b/discord_rss_bot/main.py index 6e91da5..20a9a8e 100644 --- a/discord_rss_bot/main.py +++ b/discord_rss_bot/main.py @@ -18,7 +18,8 @@ app_dir = typer.get_app_dir("discord-rss-bot") os.makedirs(app_dir, exist_ok=True) # Store the database file in the data directory -db_file: Path = Path(os.path.join(app_dir, "db.sqlite")) +db_name = os.getenv("DATABASE_NAME", "db.sqlite") +db_file: Path = Path(os.path.join(app_dir, db_name)) @app.command()