服务打包初步结构
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
/**
|
||||
* @description 应用运行时配置文件
|
||||
* @author yslg
|
||||
* @since 2025-12-06
|
||||
* @description 应用运行时配置文件 (支持 Docker 环境变量替换)
|
||||
*
|
||||
* 说明:
|
||||
* 1. 此文件在生产环境中被加载,用于覆盖内置配置
|
||||
* 2. Docker 部署时,可通过挂载此文件来修改配置,无需重新构建
|
||||
* 3. 配置结构必须与 packages/shared/src/config/index.ts 中的 AppRuntimeConfig 保持一致
|
||||
* 占位符说明:
|
||||
* - __PLACEHOLDER__ 格式的值会在 Docker 启动时被环境变量替换
|
||||
* - 如果环境变量未设置,将使用默认值
|
||||
*
|
||||
* 使用示例(Docker):
|
||||
* docker run -v /path/to/app-config.js:/app/public/app-config.js my-app:latest
|
||||
* Docker 部署:
|
||||
* 1. 通过 volume 挂载覆盖此文件
|
||||
* 2. 或通过启动脚本替换占位符
|
||||
*/
|
||||
|
||||
window.APP_RUNTIME_CONFIG = {
|
||||
// 环境标识
|
||||
env: 'production',
|
||||
env: '__APP_ENV__',
|
||||
|
||||
// API 配置
|
||||
api: {
|
||||
baseUrl: '/api',
|
||||
baseUrl: '__API_BASE_URL__',
|
||||
timeout: 30000
|
||||
},
|
||||
|
||||
@@ -27,12 +25,12 @@ window.APP_RUNTIME_CONFIG = {
|
||||
|
||||
// 文件配置
|
||||
file: {
|
||||
downloadUrl: '/api/urban-lifeline/file/download/',
|
||||
uploadUrl: '/api/urban-lifeline/file/upload',
|
||||
downloadUrl: '__API_BASE_URL__/urban-lifeline/file/download/',
|
||||
uploadUrl: '__API_BASE_URL__/urban-lifeline/file/upload',
|
||||
maxSize: {
|
||||
image: 5, // MB
|
||||
video: 100, // MB
|
||||
document: 10 // MB
|
||||
image: 5,
|
||||
video: 100,
|
||||
document: 10
|
||||
},
|
||||
acceptTypes: {
|
||||
image: 'image/*',
|
||||
@@ -44,18 +42,26 @@ window.APP_RUNTIME_CONFIG = {
|
||||
// Token 配置
|
||||
token: {
|
||||
key: 'token',
|
||||
refreshThreshold: 300000 // 5分钟
|
||||
refreshThreshold: 300000
|
||||
},
|
||||
|
||||
// 公共资源路径
|
||||
publicImgPath: '/img',
|
||||
publicWebPath: '/',
|
||||
publicImgPath: '__PUBLIC_PATH__/img',
|
||||
publicWebPath: '__PUBLIC_PATH__',
|
||||
|
||||
// 单点登录配置
|
||||
sso: {
|
||||
platformUrl: '/', // platform 平台地址
|
||||
workcaseUrl: '/workcase', // workcase 服务地址
|
||||
biddingUrl: '/bidding' // bidding 服务地址
|
||||
platformUrl: '__SSO_PLATFORM_URL__',
|
||||
workcaseUrl: '__SSO_WORKCASE_URL__',
|
||||
biddingUrl: '__SSO_BIDDING_URL__'
|
||||
},
|
||||
|
||||
// AES 加密密钥
|
||||
aesSecretKey: '__AES_SECRET_KEY__',
|
||||
|
||||
// Jitsi 视频会议配置
|
||||
jitsi: {
|
||||
serverUrl: '__JITSI_SERVER_URL__'
|
||||
},
|
||||
|
||||
// 功能开关
|
||||
|
||||
Reference in New Issue
Block a user