-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
83 lines (68 loc) · 2.64 KB
/
.env.example
File metadata and controls
83 lines (68 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# ZASCA 环境配置文件模板
# 复制此文件为 .env 并填写实际配置值
# ========== 核心配置(影响功能或必须在初始化时定义) ==========
# 调试模式(生产环境必须设置为 False)
DEBUG=True
# Django 密钥(生产环境必须修改)
DJANGO_SECRET_KEY=your-secret-key-here-change-this-in-production
# 允许访问的主机(生产环境必须配置)
ALLOWED_HOSTS=localhost,127.0.0.1
# CSRF 可信来源(生产环境必须配置)
CSRF_TRUSTED_ORIGINS=https://localhost,https://127.0.0.1
# ========== 数据库配置 ==========
# 数据库引擎: sqlite, mysql 或 postgresql
DB_ENGINE=sqlite
# MySQL 配置(DB_ENGINE=mysql 时生效)
DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=zasca
DB_USER=root
DB_PASSWORD=your_database_password_here
# PostgreSQL 配置(DB_ENGINE=postgresql 时生效)
# 安装依赖: uv sync --extra postgresql
#DB_HOST=127.0.0.1
#DB_PORT=5432
#DB_NAME=zasca
#DB_USER=postgres
#DB_PASSWORD=your_database_password_here
# ========== Redis 配置(可选增强) ==========
# Redis 是锦上添花的组件,不配置时程序使用本地替代方案:
# 缓存 -> LocMemCache(本地内存)
# 会话 -> 数据库存储
# Celery -> SQLite broker
# 配置 REDIS_URL 且 Redis 服务可达时,自动切换到 Redis:
# 缓存 -> Redis(高性能,支持分布式)
# 会话 -> Redis 缓存(更快,支持多进程共享)
# Celery -> Redis broker(更稳定,支持结果过期清理)
#REDIS_URL=redis://localhost:6379/0
# ========== Celery 配置 ==========
# 未配置 Redis 时默认使用 SQLite broker,无需手动设置
# 配置了 Redis 后默认自动使用 Redis broker(db1/db2),也可手动覆盖:
#CELERY_BROKER_URL=redis://localhost:6379/1
#CELERY_RESULT_BACKEND=redis://localhost:6379/2
# ========== 演示模式 ==========
# 设置为 1 启用演示模式
ZASCA_DEMO=0
# ========== 安全配置 ==========
# 生产环境必须设置为 True
SECURE_SSL_REDIRECT=False
SESSION_COOKIE_SECURE=False
CSRF_COOKIE_SECURE=False
# ========== 日志配置 ==========
LOG_LEVEL=DEBUG
LOG_FILE=/var/log/2c2a/application.log
# ========== WinRM 配置 ==========
WINRM_TIMEOUT=30
WINRM_RETRY_COUNT=3
# ========== Gateway 配置 ==========
GATEWAY_ENABLED=False
GATEWAY_CONTROL_SOCKET=/run/zasca/control.sock
# ========== Beta数据库配置(Beta推送插件) ==========
# 配置后可将生产数据推送到Beta版本数据库,支持MySQL和PostgreSQL架构
#BETA_DB_NAME=zasca_beta
#BETA_DB_USER=root
#BETA_DB_PASSWORD=your_beta_database_password_here
#BETA_DB_HOST=127.0.0.1
#BETA_DB_PORT=3306
# ========== Bootstrap 认证配置 ==========
BOOTSTRAP_SHARED_SALT=