build(server): 拆分环境配置,新增生产与本地环境文件
拆分原 .env 为生产环境配置 .env 和本地开发覆盖配置 .env.local,更新 .gitignore 忽略 .env 相关环境文件
This commit is contained in:
1 parent
e03fb019c5
commit
307e9cf1b9
4 files changed
+1748
-354
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
# 数据库连接配置(生产库)
|
||||
PG_HOST=222.243.55.42
|
||||
PG_PORT=26532
|
||||
PG_DATABASE=xintong
|
||||
PG_USERNAME=postgres
|
||||
PG_PASSWORD=7F0d9T7SOroYqgXqtZ7tHL2SbnvUljHe
|
||||
|
||||
# RustFS 对象存储配置(S3 兼容、path-style 访问;单个 AK 可同时访问两个桶)
|
||||
RUSTFS_ENDPOINT=222.243.55.42
|
||||
RUSTFS_PORT=26900
|
||||
RUSTFS_USE_SSL=false
|
||||
RUSTFS_ACCESS_KEY=7pyFyHpZhAtANjQaG9gj
|
||||
RUSTFS_SECRET_KEY=lLwpK0U6KaAtiuczLiJu2zVz3JevLPM4a4WRKqEO
|
||||
RUSTFS_REGION=us-east-1
|
||||
# 两个存储桶(同时配置),实际使用由 RUSTFS_BUCKET 决定
|
||||
RUSTFS_BUCKET_PROD=xintong
|
||||
RUSTFS_BUCKET_TEST=xintong-test
|
||||
# 当前生效的存储桶:生产=xintong,本地测试桶在 .env.local 中覆盖为 xintong-test
|
||||
RUSTFS_BUCKET=xintong
|
||||
|
||||
# Redis 配置(与 PostgreSQL / RustFS 同机部署)
|
||||
REDIS_HOST=222.243.55.42
|
||||
REDIS_PORT=26678
|
||||
REDIS_PASSWORD=
|
||||
@@ -0,0 +1,9 @@
|
||||
# 本地开发库连接配置(MIDWAY_SERVER_ENV=local 时生效,覆盖 .env 中的生产库配置)
|
||||
PG_HOST=127.0.0.1
|
||||
PG_PORT=5432
|
||||
PG_DATABASE=xintong
|
||||
PG_USERNAME=postgres
|
||||
PG_PASSWORD=postgres
|
||||
|
||||
# 本地开发使用测试桶(RustFS 仍复用服务器上的同一套地址与密钥)
|
||||
RUSTFS_BUCKET=xintong-test
|
||||
@@ -15,10 +15,6 @@ yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
|
||||
+1715
-350
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user