specify environment variable
This commit is contained in:
parent
ca9d0ce6eb
commit
43eb4a0fdf
|
@ -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"
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue