You can now use a environment variable for database name

This commit is contained in:
Joakim Hellsén 2021-12-22 19:19:26 +01:00
commit aa343f3544
No known key found for this signature in database
GPG key ID: 01FD861E3DAC09AC

View file

@ -18,7 +18,8 @@ app_dir = typer.get_app_dir("discord-rss-bot")
os.makedirs(app_dir, exist_ok=True) os.makedirs(app_dir, exist_ok=True)
# Store the database file in the data directory # 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() @app.command()