adding my data

This commit is contained in:
2025-09-06 21:22:24 +00:00
parent 8fd26c9f1f
commit 2be032023d
5 changed files with 10 additions and 47 deletions

View File

@@ -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
}
)

View File

@@ -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

View File

@@ -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

View File

@@ -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) для всех запросов

View File

@@ -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