## 配置与环境 - .env.example: 更新环境变量配置 - docker-compose.yml: 完善Docker编排配置 - docker/README.md: 更新Docker文档 ## 后端知识库模块 - endpoints/knowledge.py: 增强知识库API端点 - schemas/knowledge.py: 扩展知识库数据模型 - services/knowledge.py: 完善知识库业务逻辑 - config.py: 优化配置管理 - storage/knowledge/.index.json: 更新知识库索引 ## 前端功能 - api.js: 完善API服务层 - knowledge.js: 优化知识库服务 - onlyoffice.js: 新增OnlyOffice文档服务集成 - TopBar.vue: 优化顶部导航栏 - PoliciesView.vue: 完善策略视图 - AppShellRouteView.vue: 新增应用外壳路由视图 - views/scripts/PoliciesView.js: 优化策略脚本 - policiesPreviewFormatters.js: 新增策略预览格式化工具 ## 样式 - policies-view.css: 完善策略页样式 ## 测试 - api-request.test.mjs: API请求测试 - onlyoffice-service.test.mjs: OnlyOffice服务测试 - policies-preview-formatters.test.mjs: 策略预览格式化测试
78 lines
2.5 KiB
YAML
78 lines
2.5 KiB
YAML
services:
|
|
main:
|
|
image: ubuntu-dev:latest
|
|
container_name: x-financial-main
|
|
restart: unless-stopped
|
|
depends_on:
|
|
onlyoffice:
|
|
condition: service_started
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
WEB_HOST: 0.0.0.0
|
|
SERVER_HOST: 0.0.0.0
|
|
SERVER_VENV_DIR: /tmp/x-financial-server-venv
|
|
ONLYOFFICE_ENABLED: "${ONLYOFFICE_ENABLED:-true}"
|
|
ONLYOFFICE_PUBLIC_URL: "${ONLYOFFICE_PUBLIC_URL:-http://127.0.0.1:${ONLYOFFICE_PORT:-8082}}"
|
|
ONLYOFFICE_BACKEND_URL: "${ONLYOFFICE_BACKEND_URL:-http://main:${SERVER_PORT:-8000}}"
|
|
ONLYOFFICE_JWT_SECRET: "${ONLYOFFICE_JWT_SECRET:-x-financial-onlyoffice-dev-secret}"
|
|
ports:
|
|
- "${WEB_PORT:-5173}:${WEB_PORT:-5173}"
|
|
- "${SERVER_PORT:-8000}:${SERVER_PORT:-8000}"
|
|
- "2223:22"
|
|
working_dir: /app
|
|
command:
|
|
- /bin/sh
|
|
- -lc
|
|
- >
|
|
apt-get update &&
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
|
|
python3 python3-pip python3-venv &&
|
|
mkdir -p /run/sshd && /usr/sbin/sshd &&
|
|
sed -i 's/\r$//' /app/start.sh /app/web/web_start.sh /app/server/server_start.sh &&
|
|
chmod +x /app/start.sh /app/web/web_start.sh /app/server/server_start.sh &&
|
|
./start.sh all
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:${WEB_PORT:-5173}/ >/dev/null || exit 1"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 180s
|
|
|
|
onlyoffice:
|
|
image: onlyoffice/documentserver:latest
|
|
container_name: x-financial-onlyoffice
|
|
restart: unless-stopped
|
|
environment:
|
|
JWT_ENABLED: "true"
|
|
JWT_SECRET: "${ONLYOFFICE_JWT_SECRET:-x-financial-onlyoffice-dev-secret}"
|
|
ports:
|
|
- "${ONLYOFFICE_PORT:-8082}:80"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1/healthcheck >/dev/null || exit 1"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 60s
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: x-financial-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-x_financial}
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
ports:
|
|
- "${POSTGRES_EXPOSE_PORT:-55432}:5432"
|
|
volumes:
|
|
- ./postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-x_financial}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
volumes:
|
|
postgres_data:
|