test-backend/deploy/.env.example

80 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================
# 部署配置模板 — 复制为 .env 后修改
# 快速开始: bash deploy.sh init(交互式生成)
# 手动配置: cp .env.example .env && vim .env
# ============================================
# 部署架构: 1=单体 3=SpringCloud
DEPLOY_MODE=1
COMPOSE_FILE=docker-compose.yml
# 应用
APP_NAME=test
APP_PORT=8008
JAVA_OPTS="-Xms512m -Xmx512m"
# 数据库
DB_NAME=test_base
# 网络
NETWORK_NAME=ghb-net
# ---- 中间件策略 ----
# docker = Docker 一起安装 | external = 连接外部服务 | none = 不使用(仅 MinIO)
MYSQL_MODE=docker
REDIS_MODE=docker
MINIO_MODE=none
# ---- MySQL(docker 模式) ----
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=ChangeMe123
# ---- MySQL(external 模式) ----
# MYSQL_HOST=127.0.0.1
# MYSQL_USER=root
# MYSQL_PASS='ChangeMe123'
# MYSQL_URL='jdbc:mysql://127.0.0.1:3306/test_base?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true'
# ---- Redis(docker 模式) ----
REDIS_PORT=6379
REDIS_PASS=''
# ---- Redis(external 模式) ----
# REDIS_HOST=127.0.0.1
# REDIS_DB=0
# ---- MinIO(docker 模式) ----
# MINIO_HOST=minio
# MINIO_PORT=9000
# MINIO_CONSOLE_PORT=9001
# MINIO_ACCESS_KEY=minioadmin
# MINIO_SECRET_KEY=minioadmin
# MINIO_BUCKET=ghb-base
# MINIO_ENDPOINT=http://minio:9000
# ---- MinIO(external 模式) ----
# MINIO_HOST=127.0.0.1
# MINIO_PORT=9000
# MINIO_ACCESS_KEY=minioadmin
# MINIO_SECRET_KEY=minioadmin
# MINIO_BUCKET=ghb-base
# MINIO_ENDPOINT=http://127.0.0.1:9000
# ---- Spring Cloud(仅 DEPLOY_MODE=3) ----
# NACOS_PORT=8848
# GATEWAY_PORT=9999
# SYSTEM_PORT=7001
# 数据库初始化(仅 external MySQL,true 时启动前自动建表)
DB_INIT=false
# 跳过连通性检查(true 时不检查外接服务是否可达)
SKIP_CONNECTIVITY_CHECK=false
# 上传方式: local(本地) / minio(MinIO)
JEECG_UPLOAD_TYPE=local
# ---- 前端集成(可选) ----
FRONTEND_ENABLED=false
# FRONTEND_PORT=80
# JWT 密钥(自动生成或手动填写)
JWT_SECRET='your-jwt-secret-here'