From 2be032023d5f646a04fcb30234e6131e7c1b48e5 Mon Sep 17 00:00:00 2001 From: "dr.holy" Date: Sat, 6 Sep 2025 21:22:24 +0000 Subject: [PATCH] adding my data --- backend/apps/core/models.py | 2 +- backend/videocall_app/settings.py | 7 +++---- env.example | 33 ------------------------------- nginx.conf | 12 +++++------ videocall-frontend/.env.example | 3 --- 5 files changed, 10 insertions(+), 47 deletions(-) delete mode 100644 env.example delete mode 100644 videocall-frontend/.env.example diff --git a/backend/apps/core/models.py b/backend/apps/core/models.py index 10336d7..76a7055 100644 --- a/backend/apps/core/models.py +++ b/backend/apps/core/models.py @@ -35,7 +35,7 @@ class SystemSettings(models.Model): settings, created = cls.objects.get_or_create( pk=1, defaults={ - 'access_password_hash': make_password('admin123'), + 'access_password_hash': g('admin123'), 'is_active': True } ) diff --git a/backend/videocall_app/settings.py b/backend/videocall_app/settings.py index 1edd8eb..588c6f0 100644 --- a/backend/videocall_app/settings.py +++ b/backend/videocall_app/settings.py @@ -6,11 +6,11 @@ from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent # Security settings -SECRET_KEY = config('SECRET_KEY', default='your-secret-key-here-change-in-production') +SECRET_KEY = config('SECRET_KEY', default='5vpYXFM1NTW8e8lxZOqfR6OZSKANooMnCdTuHu11rn') DEBUG = config('DEBUG', default=False, cast=bool) # ALLOWED_HOSTS - только ваши настоящие домены -allowed_hosts_default = 'yourdomain.com,www.yourdomain.com,localhost,127.0.0.1' +allowed_hosts_default = 'test.byte-mate.xyz,localhost,127.0.0.1' ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=allowed_hosts_default).split(',') # Убираем пустые строки и пробелы @@ -135,8 +135,7 @@ CSRF_TRUSTED_ORIGINS = [ if not DEBUG: # Add your production domains CSRF_TRUSTED_ORIGINS.extend([ - 'https://yourdomain.com', - 'https://www.yourdomain.com', + 'https://test.byte-mate.xyz', ]) # REST Framework configuration diff --git a/env.example b/env.example deleted file mode 100644 index ce16e53..0000000 --- a/env.example +++ /dev/null @@ -1,33 +0,0 @@ -# Django настройки -DEBUG=False -SECRET_KEY=your-super-secret-django-key-change-this-immediately-in-production - -# База данных PostgreSQL -POSTGRES_DB=videocall_db -POSTGRES_USER=postgres -POSTGRES_PASSWORD=your-strong-db-password-here -DB_PASSWORD=your-strong-db-password-here -DB_HOST=db -DB_PORT=5432 - -# Redis для сессий и WebSocket -REDIS_URL=redis://redis:6379/0 - -# Настройки приложения -ROOM_EXPIRY_HOURS=24 -MAX_PARTICIPANTS_PER_ROOM=2 -SHORT_CODE_LENGTH=6 - -# CORS настройки -CORS_ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com -ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com,localhost,127.0.0.1 - -# SSL сертификаты (пути в системе) -SSL_CERT_PATH=/etc/letsencrypt/live/yourdomain.com/fullchain.pem -SSL_KEY_PATH=/etc/letsencrypt/live/yourdomain.com/privkey.pem -DOMAIN_NAME=yourdomain.com - -# Frontend настройки (для разработки) -VITE_API_BASE_URL=https://yourdomain.com/api -VITE_WS_BASE_URL=wss://yourdomain.com -VITE_APP_NAME=Video Call App diff --git a/nginx.conf b/nginx.conf index c0f53bd..173a55c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -67,11 +67,11 @@ http { server { listen 443 ssl; http2 on; - server_name yourdomain.com www.yourdomain.com; + server_name test.byte-mate.xyz; # SSL Configuration - ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; + ssl_certificate /etc/letsencrypt/live/test.byte-mate.xyz/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/test.byte-mate.xyz/privkey.pem; # Modern SSL configuration ssl_protocols TLSv1.2 TLSv1.3; @@ -254,7 +254,7 @@ http { # HTTP to HTTPS redirect server { listen 80; - server_name yourdomain.com www.yourdomain.com; + server_name test.byte-mate.xyz; # Allow Let's Encrypt challenges location /.well-known/acme-challenge/ { @@ -274,8 +274,8 @@ http { server_name _; # Минимальная SSL конфигурация для блокировки HTTPS запросов - ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; + ssl_certificate /etc/letsencrypt/live/test.byte-mate.xyz/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/test.byte-mate.xyz/privkey.pem; ssl_reject_handshake on; # Возвращаем 444 (connection closed without response) для всех запросов diff --git a/videocall-frontend/.env.example b/videocall-frontend/.env.example deleted file mode 100644 index 321b2b3..0000000 --- a/videocall-frontend/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -VITE_API_BASE_URL=https://yourdomain.com/api -VITE_WS_BASE_URL=wss://yourdomain.com -VITE_APP_NAME=Video Call App