fix env
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
2025-09-26 20:26:48 +03:00
parent 355f81520c
commit 5f2a00ba4a
2 changed files with 4 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ user_info_template = ("Новый пользователь ждет регист
"Юзернейм: @{}\n"
"ID: @msg_{}\n")
admins_ids = list(map(int, os.getenv("BOT_ADMINS").split(",")))
@registration_router.message(CommandStart())
@@ -33,7 +33,7 @@ async def start_command(message: Message, bot: Bot):
dict_for_inline = {f'reg_@{user.id}': 'Allow', f'del_@{user.id}': 'Reject'}
user_info = user_info_template.format(user.first_name, user.last_name if user.last_name else 'Не указана',
user.username if user.username else 'Не указан', user.id)
for admin in admins_ids:
for admin in list(map(int, os.getenv("BOT_ADMINS").split(","))):
try:
await bot.send_message(chat_id=admin, text=user_info)
await bot.send_message(chat_id=admin, text='Зарегистрировать пользователя',

View File

@@ -40,10 +40,10 @@ steps:
DB_PASSWORD:
from_secret: DB_PASSWORD
commands:
- echo "$ENV_CONTENT" > .env
- docker stop myapp || true
- docker rm myapp || true
- docker run --name=myapp --network=prod_net -v /srv/prod/telegram_bot/photos:/app/photos/ -v /srv/prod/telegram_bot/.env:/app/.env:ro myapp:${DRONE_COMMIT_BRANCH}
- docker run --name=myapp --network=prod_net -v /srv/prod/telegram_bot/photos:/app/photos/ \
-v /srv/prod/telegram_bot/.env:/app/.env:ro myapp:${DRONE_COMMIT_BRANCH}
volumes: