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}" ] command: [ "--config", "/etc/livekit/livekit.yaml", "--keys", "${LIVEKIT_API_KEY}: ${LIVEKIT_API_SECRET}" ]
restart: always restart: always
healthcheck: 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 interval: 10s
timeout: 5s timeout: 5s
retries: 3 retries: 3

View File

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

View File

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

View File

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