首次提交:初始化项目代码
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# CloudNest 开发环境配置
|
||||
# CloudNest Development Environment Configuration
|
||||
# 自动加载数据库、缓存、存储的本地连接地址
|
||||
# Automatically loads local connection addresses for database, cache, and storage
|
||||
|
||||
app:
|
||||
env: development
|
||||
log_level: debug
|
||||
file_service_url: http://localhost:8082
|
||||
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
# Auth Service 默认端口 / Auth Service default port
|
||||
# File Service 请通过 SERVER_PORT=8082 环境变量覆盖 / Override File Service via SERVER_PORT=8082 env var
|
||||
port: 8081
|
||||
|
||||
database:
|
||||
host: localhost
|
||||
port: 3306
|
||||
user: root
|
||||
password: sun900120
|
||||
dbname: cloudnest
|
||||
|
||||
cache:
|
||||
host: localhost
|
||||
port: 6379
|
||||
|
||||
storage:
|
||||
endpoint: localhost:9000
|
||||
access_key_id: minioadmin
|
||||
secret_access_key: minioadmin
|
||||
bucket_name: cloudnest-files
|
||||
@@ -0,0 +1,44 @@
|
||||
# CloudNest 生产环境配置
|
||||
# CloudNest Production Environment Configuration
|
||||
# ⚠️ 生产环境敏感信息请通过环境变量注入,不要直接写在此文件
|
||||
# ⚠️ Production sensitive info should be injected via environment variables, DO NOT hardcode here
|
||||
|
||||
app:
|
||||
env: production
|
||||
log_level: info
|
||||
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
port: 8080
|
||||
graceful_shutdown_timeout: 60
|
||||
|
||||
database:
|
||||
# 生产环境请使用环境变量覆盖密码 / Use env var to override password in production
|
||||
host: ${DB_HOST}
|
||||
port: ${DB_PORT:3306}
|
||||
user: ${DB_USER}
|
||||
password: ${DB_PASSWORD}
|
||||
dbname: ${DB_NAME:cloudnest}
|
||||
max_idle_conns: 20
|
||||
max_open_conns: 200
|
||||
conn_max_lifetime: 7200
|
||||
|
||||
cache:
|
||||
host: ${REDIS_HOST}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD}
|
||||
db: ${REDIS_DB:0}
|
||||
pool_size: 50
|
||||
min_idle_conns: 10
|
||||
|
||||
storage:
|
||||
endpoint: ${MINIO_ENDPOINT}
|
||||
access_key_id: ${MINIO_ACCESS_KEY}
|
||||
secret_access_key: ${MINIO_SECRET_KEY}
|
||||
bucket_name: ${MINIO_BUCKET:cloudnest-files}
|
||||
use_ssl: ${MINIO_USE_SSL:true}
|
||||
max_file_size: 500
|
||||
|
||||
jwt:
|
||||
secret: ${JWT_SECRET}
|
||||
expires_in: 168
|
||||
@@ -0,0 +1,34 @@
|
||||
# CloudNest 测试环境配置
|
||||
# CloudNest Test Environment Configuration
|
||||
# 使用内存数据库或测试专用实例
|
||||
# Uses in-memory database or test-specific instances
|
||||
|
||||
app:
|
||||
env: test
|
||||
log_level: warn
|
||||
|
||||
server:
|
||||
host: 127.0.0.1
|
||||
port: 18080
|
||||
|
||||
database:
|
||||
host: localhost
|
||||
port: 3306
|
||||
user: root
|
||||
password: sun900120
|
||||
dbname: cloudnest_test
|
||||
|
||||
cache:
|
||||
host: localhost
|
||||
port: 6379
|
||||
db: 1
|
||||
|
||||
storage:
|
||||
endpoint: localhost:9000
|
||||
access_key_id: minioadmin
|
||||
secret_access_key: minioadmin
|
||||
bucket_name: cloudnest-test-files
|
||||
|
||||
jwt:
|
||||
secret: test-secret-key
|
||||
expires_in: 1
|
||||
@@ -0,0 +1,71 @@
|
||||
# CloudNest 基础配置文件
|
||||
# CloudNest Base Configuration File
|
||||
# 此文件包含所有环境的默认配置,可被环境特定配置覆盖
|
||||
# This file contains default config for all environments, can be overridden by env-specific configs
|
||||
|
||||
app:
|
||||
name: cloudnest
|
||||
version: 1.0.0
|
||||
env: development
|
||||
log_level: info
|
||||
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
port: 8080
|
||||
# graceful_shutdown_timeout: 30s
|
||||
# 优雅关闭超时时间(秒)
|
||||
graceful_shutdown_timeout: 30
|
||||
|
||||
database:
|
||||
# MySQL DSN 格式: user:password@tcp(host:port)/dbname?charset=utf8mb4&parseTime=True&loc=Local
|
||||
# MySQL DSN format: user:password@tcp(host:port)/dbname?charset=utf8mb4&parseTime=True&loc=Local
|
||||
driver: mysql
|
||||
host: localhost
|
||||
port: 3306
|
||||
user: root
|
||||
password: ""
|
||||
dbname: cloudnest
|
||||
charset: utf8mb4
|
||||
parse_time: true
|
||||
loc: Local
|
||||
max_idle_conns: 10
|
||||
max_open_conns: 100
|
||||
conn_max_lifetime: 3600
|
||||
|
||||
cache:
|
||||
driver: redis
|
||||
host: localhost
|
||||
port: 6379
|
||||
password: ""
|
||||
db: 0
|
||||
# Redis 连接池配置 / Redis connection pool settings
|
||||
pool_size: 10
|
||||
min_idle_conns: 5
|
||||
|
||||
storage:
|
||||
driver: minio
|
||||
endpoint: localhost:9000
|
||||
access_key_id: minioadmin
|
||||
secret_access_key: minioadmin
|
||||
bucket_name: cloudnest-files
|
||||
use_ssl: false
|
||||
# 预签名 URL 有效期(小时)/ Presigned URL expiration (hours)
|
||||
presign_duration: 24
|
||||
# 最大上传文件大小(MB)/ Max upload file size (MB)
|
||||
max_file_size: 100
|
||||
# 回收站文件过期天数 / Recycle bin file expiration days
|
||||
recycle_bin_expire_days: 7
|
||||
|
||||
jwt:
|
||||
secret: cloudnest-secret-key
|
||||
# Token 过期时间(小时)/ Token expiration time (hours)
|
||||
expires_in: 720
|
||||
# 签发者 / Issuer
|
||||
issuer: cloudnest
|
||||
|
||||
email:
|
||||
smtp_host: "smtp.qq.com"
|
||||
smtp_port: 587
|
||||
smtp_username: ""
|
||||
smtp_password: ""
|
||||
from_name: "CloudNest"
|
||||
Reference in New Issue
Block a user