Enhance database management features by adding an API endpoint to drop all tables with double confirmation. Implement configuration file upload and download functionalities, including backup of the existing configuration. Update UI elements for improved user experience, including pagination controls and toast notifications. Adjust Docker and git ignore files to optimize build processes.

This commit is contained in:
2026-01-14 18:27:05 +08:00
parent 866fc1cb06
commit 5b50c9750f
19 changed files with 2424 additions and 166 deletions
+79
View File
@@ -0,0 +1,79 @@
# CapacityReport Docker 编排文件
# 用于内网离线部署
#
# 使用方法:
# sh deploy.sh # 一键导入镜像并启动服务
# docker-compose up -d # 启动所有服务
# docker-compose down # 停止所有服务
version: '3.8'
services:
# 容量报表应用
capacity-app:
image: capacity-report-app:latest
container_name: capacity-report-app
restart: unless-stopped
ports:
- "19081:9081"
volumes:
# 持久化数据
- ./cache:/app/cache
- ./Configure.json:/app/Configure.json
- ./ReportScript.sql:/app/ReportScript.sql
# 日志目录
- ./logs:/var/log/supervisor
environment:
- TZ=Asia/Shanghai
- PYTHONUNBUFFERED=1
- SUPERVISOR_ENABLED=1
depends_on:
capacity-mysql:
condition: service_healthy
networks:
- capacity-network
# MySQL 数据库
capacity-mysql:
image: capacity-mysql:8.0.44
container_name: capacity-mysql
restart: unless-stopped
ports:
- "13306:3306"
volumes:
# 数据持久化
- capacity-mysql-data:/var/lib/mysql
# 自定义配置(启用 LOAD DATA INFILE)
- ./mysql/conf.d:/etc/mysql/conf.d:ro
# 初始化脚本(仅在首次启动时执行)
- ./mysql/init:/docker-entrypoint-initdb.d:ro
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=gmcc123
- MYSQL_DATABASE=CapacityReport
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --local-infile=ON
- --secure-file-priv=
- --max_allowed_packet=256M
- --innodb_buffer_pool_size=512M
- --innodb_log_file_size=128M
- --innodb_flush_log_at_trx_commit=2
- --sync_binlog=0
networks:
- capacity-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-pgmcc123"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
capacity-network:
driver: bridge
volumes:
capacity-mysql-data:
driver: local