-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathdocker.env.mariadb.example
More file actions
103 lines (91 loc) · 3.03 KB
/
Copy pathdocker.env.mariadb.example
File metadata and controls
103 lines (91 loc) · 3.03 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# ==============================================================================
# EggCMS Docker 环境配置(MariaDB 模式示例)
# 复制为 .env 后即可直接使用:cp docker.env.mariadb.example .env
# ⚠️ 上线前务必修改密码和密钥
# ==============================================================================
# =================================
# 服务器基础配置
# =================================
NODE_ENV=production
PORT=8080
HOSTNAME=0.0.0.0
# =================================
# 数据库类型选择
# =================================
DATABASE_TYPE=mariadb
# docker compose profiles
COMPOSE_PROFILES=mariadb
# Repository 模式(MariaDB 建议开启)
REPOSITORY_ENABLED=true
# =================================
# 数据库初始化控制
# =================================
# 跳过数据库初始化检查(生产环境建议设为 true)
# - false: 应用启动时检查并初始化空数据库(默认)
# - true: 跳过初始化检查,适用于已有数据的生产环境
DB_SKIP_INIT=false
# 强制重新初始化数据库(危险操作 ⚠️)
# - false: 不强制初始化(默认)
# - true: 清空并重新初始化数据库(会删除所有数据!)
# 警告:仅在开发/测试环境使用,生产环境禁止开启
DB_FORCE_INIT=false
# =================================
# MariaDB 数据库配置
# =================================
MARIADB_HOST=mariadb
MARIADB_PORT=3306
MARIADB_USERNAME=eggcms
MARIADB_PASSWORD=eggcms123
MARIADB_DATABASE=doracms3
MARIADB_ROOT_PASSWORD=admin123
# =================================
# Redis 配置(必选)
# =================================
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# =================================
# 安全配置(生产环境必须修改 ⚠️)
# =================================
APP_KEYS=replace_with_strong_random_key
SESSION_SECRET=replace_with_strong_random_secret
AUTH_COOKIE_NAME=doracms
ENCRYPT_KEY=dora
SALT_AES_KEY=doracms_
SALT_MD5_KEY=dora
# =================================
# CORS 和域名配置
# =================================
CORS_ORIGINS=http://localhost:8080,https://your-domain.com
DOMAIN_WHITELIST=localhost,your-domain.com
# =================================
# 外部服务配置
# =================================
CDN_ORIGIN=https://cdn.html-js.cn
API_DOMAIN=https://api.html-js.cn
ADMIN_BASE_PATH=/admin
# =================================
# 备份与日志
# =================================
BACKUP_SCHEDULE=0 2 * * *
BACKUP_RETENTION_DAYS=30
LOG_LEVEL=INFO
LOG_DIR=/app/server/logs
# =================================
# 缓存配置
# =================================
CACHE_TYPE=memory
CACHE_DEFAULT_TTL=3600
MEMORY_CACHE_MAX_SIZE=1000
CACHE_NAMESPACE=cms3:docker
CACHE_WATCH_ENABLED=true
CACHE_WATCH_CHANNEL=unified-cache:watch
CACHE_WATCH_BROADCAST_VALUE=true
PERMISSION_HOT_RELOAD_ENABLED=true
PERMISSION_HOT_RELOAD_INTERVAL=5000
# =================================
# 上传配置
# =================================
UPLOAD_MAX_SIZE=5MB
UPLOAD_ALLOWED_TYPES=.jpg,.jpeg,.png,.gif,.pdf,.doc,.docx