fix(stable): fix secret

This commit is contained in:
roai_linux 2026-03-30 11:37:21 +03:30
parent 135d7d0ff3
commit 017046dafd
4 changed files with 11 additions and 17 deletions

View File

@ -48,7 +48,7 @@ services:
command: [ "--config", "/etc/livekit/livekit.yaml", "--keys", "${LIVEKIT_API_KEY}: ${LIVEKIT_API_SECRET}" ]
restart: always
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7880/health" ]
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7780/health" ]
interval: 10s
timeout: 5s
retries: 3

View File

@ -11,12 +11,10 @@ from domains.users.repo import (
)
from core.security import hash_password
from core.config import Settings
def generate_user_secret():
# return secrets.token_urlsafe(16)
#for test
return "1234"
return secrets.token_urlsafe(Settings.SECRET_PASS_LENGTH)
async def admin_create_user(
db: AsyncSession,

View File

@ -1,19 +1,15 @@
port: 7880
port: 7780
rtc:
tcp_port: 7881
tcp_port: 7781
port_range_start: 51000
port_range_end: 51100
port_range_end: 52000
use_external_ip: false
node_ip: "188.213.199.211" # uncomment when using server ip
allow_tcp_fallback: true
congestion_control:
enabled: true
room:
empty_timeout: 600
departure_timeout: 600
auto_create: true
# room:
# empty_timeout: 600
# departure_timeout: 600
##### uncomment when using letsencrypt in server #######
turn:

View File

@ -4,12 +4,12 @@ import secrets
from db.session import AsyncSessionLocal
from domains.users.models import User
from core.security import hash_password
from core.config import Settings
async def create_admin() -> None:
username = input("Admin username: ").strip()
phone_number = input("Phone number (optional, 11 digits): ").strip() or None
# secret = secrets.token_urlsafe(16)
secret = "1234"
secret = secrets.token_urlsafe(Settings.SECRET_PASS_LENGTH)
async with AsyncSessionLocal() as db:
try: