specify environment variable

This commit is contained in:
missytake 2023-10-09 07:49:06 +02:00
parent ca9d0ce6eb
commit 43eb4a0fdf
2 changed files with 3 additions and 4 deletions

View file

@ -39,7 +39,7 @@ def teams_bot(ctx):
"--password", type=str, default=None, help="the password of the email account"
)
@click.option(
"--db_dir", type=str, default="teams_bot_data", help="path to the bot's database"
"--dbdir", type=str, default="teams_bot_data", help="path to the bot's database", envvar="TEAMS_DBDIR"
)
@click.option(
"-v", "--verbose", count=True, help="show low level delta chat ffi events"
@ -121,7 +121,7 @@ def init(ctx, email: str, password: str, db_dir: str, verbose: int):
@teams_bot.command()
@click.option(
"--db_dir", type=str, default="teams_bot_data", help="path to the bot's database"
"--dbdir", type=str, default="teams_bot_data", help="path to the bot's database", envvar="TEAMS_DBDIR"
)
@click.option(
"-v", "--verbose", count=True, help="show low level delta chat ffi events"

View file

@ -43,8 +43,7 @@ def deploy_teams_bot(unix_user: str, bot_email: str, bot_passwd: str, dbdir: str
secrets = [
f"TEAMS_INIT_EMAIL={bot_email}",
f"TEAMS_INIT_PASSWORD={bot_passwd}",
f'TEAMS_INIT_DBDIR={dbdir}',
f'TEAMS_RUN_DBDIR={dbdir}',
f'TEAMS_DBDIR={dbdir}',
]
env = "\n".join(secrets)
files.put(