adding my data
This commit is contained in:
@@ -35,7 +35,7 @@ class SystemSettings(models.Model):
|
|||||||
settings, created = cls.objects.get_or_create(
|
settings, created = cls.objects.get_or_create(
|
||||||
pk=1,
|
pk=1,
|
||||||
defaults={
|
defaults={
|
||||||
'access_password_hash': make_password('admin123'),
|
'access_password_hash': g('admin123'),
|
||||||
'is_active': True
|
'is_active': True
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ from pathlib import Path
|
|||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
# Security settings
|
# 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)
|
DEBUG = config('DEBUG', default=False, cast=bool)
|
||||||
|
|
||||||
# ALLOWED_HOSTS - только ваши настоящие домены
|
# 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(',')
|
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=allowed_hosts_default).split(',')
|
||||||
|
|
||||||
# Убираем пустые строки и пробелы
|
# Убираем пустые строки и пробелы
|
||||||
@@ -135,8 +135,7 @@ CSRF_TRUSTED_ORIGINS = [
|
|||||||
if not DEBUG:
|
if not DEBUG:
|
||||||
# Add your production domains
|
# Add your production domains
|
||||||
CSRF_TRUSTED_ORIGINS.extend([
|
CSRF_TRUSTED_ORIGINS.extend([
|
||||||
'https://yourdomain.com',
|
'https://test.byte-mate.xyz',
|
||||||
'https://www.yourdomain.com',
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# REST Framework configuration
|
# REST Framework configuration
|
||||||
|
|||||||
33
env.example
33
env.example
@@ -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
|
|
||||||
12
nginx.conf
12
nginx.conf
@@ -67,11 +67,11 @@ http {
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
http2 on;
|
http2 on;
|
||||||
server_name yourdomain.com www.yourdomain.com;
|
server_name test.byte-mate.xyz;
|
||||||
|
|
||||||
# SSL Configuration
|
# SSL Configuration
|
||||||
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/test.byte-mate.xyz/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/test.byte-mate.xyz/privkey.pem;
|
||||||
|
|
||||||
# Modern SSL configuration
|
# Modern SSL configuration
|
||||||
ssl_protocols TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
@@ -254,7 +254,7 @@ http {
|
|||||||
# HTTP to HTTPS redirect
|
# HTTP to HTTPS redirect
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name yourdomain.com www.yourdomain.com;
|
server_name test.byte-mate.xyz;
|
||||||
|
|
||||||
# Allow Let's Encrypt challenges
|
# Allow Let's Encrypt challenges
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
@@ -274,8 +274,8 @@ http {
|
|||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
# Минимальная SSL конфигурация для блокировки HTTPS запросов
|
# Минимальная SSL конфигурация для блокировки HTTPS запросов
|
||||||
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/test.byte-mate.xyz/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/test.byte-mate.xyz/privkey.pem;
|
||||||
ssl_reject_handshake on;
|
ssl_reject_handshake on;
|
||||||
|
|
||||||
# Возвращаем 444 (connection closed without response) для всех запросов
|
# Возвращаем 444 (connection closed without response) для всех запросов
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user