feat: 完成sys模块迁移,对齐PHP/Java框架
- 重构sys模块架构,严格按admin/api/core分层 - 对齐所有sys实体与数据库表结构 - 实现完整的adminapi控制器,匹配PHP/Java契约 - 修复依赖注入问题,确保服务正确注册 - 添加自动迁移工具和契约验证 - 完善多租户支持和审计功能 - 统一命名规范,与PHP业务逻辑保持一致
This commit is contained in:
63
tools/deploy/1panel-docker-compose.yml
Normal file
63
tools/deploy/1panel-docker-compose.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
version: "3.8"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
# Redpanda Kafka 消息队列
|
||||
redpanda:
|
||||
image: redpandadata/redpanda:latest
|
||||
container_name: wwjcloud-redpanda
|
||||
command:
|
||||
- redpanda
|
||||
- start
|
||||
- --overprovisioned
|
||||
- --smp
|
||||
- "1"
|
||||
- --memory
|
||||
- 1G
|
||||
- --reserve-memory
|
||||
- 0M
|
||||
- --node-id
|
||||
- "0"
|
||||
- --check=false
|
||||
- --kafka-addr
|
||||
- PLAINTEXT://0.0.0.0:9092,INTERNAL://0.0.0.0:9093
|
||||
- --advertise-kafka-addr
|
||||
- PLAINTEXT://192.168.1.35:9092,INTERNAL://redpanda:9093
|
||||
ports:
|
||||
- "9092:9092"
|
||||
- "9093:9093"
|
||||
- "9644:9644"
|
||||
volumes:
|
||||
- redpanda_data:/var/lib/redpanda/data
|
||||
networks:
|
||||
- 1panel-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "rpk", "cluster", "health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Kafka UI 管理界面
|
||||
kafka-ui:
|
||||
image: provectuslabs/kafka-ui:latest
|
||||
container_name: wwjcloud-kafka-ui
|
||||
environment:
|
||||
- KAFKA_CLUSTERS_0_NAME=wwjcloud
|
||||
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=redpanda:9093
|
||||
- SERVER_PORT=8082
|
||||
ports:
|
||||
- "8082:8082"
|
||||
networks:
|
||||
- 1panel-network
|
||||
depends_on:
|
||||
redpanda:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
redpanda_data:
|
||||
driver: local
|
||||
66
tools/deploy/infra/docker-compose.yml
Normal file
66
tools/deploy/infra/docker-compose.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: wwjcloud-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
restart: unless-stopped
|
||||
|
||||
redpanda:
|
||||
image: redpandadata/redpanda:latest
|
||||
container_name: wwjcloud-redpanda
|
||||
command:
|
||||
- redpanda
|
||||
- start
|
||||
- --overprovisioned
|
||||
- --smp
|
||||
- "1"
|
||||
- --memory
|
||||
- 1G
|
||||
- --reserve-memory
|
||||
- 0M
|
||||
- --node-id
|
||||
- "0"
|
||||
- --check=false
|
||||
- --kafka-addr
|
||||
- PLAINTEXT://0.0.0.0:9092
|
||||
- --advertise-kafka-addr
|
||||
- PLAINTEXT://${KAFKA_ADVERTISED_HOST:-localhost}:9092
|
||||
ports:
|
||||
- "9092:9092"
|
||||
- "9644:9644"
|
||||
volumes:
|
||||
- ./data/redpanda:/var/lib/redpanda/data
|
||||
restart: unless-stopped
|
||||
|
||||
kafka-ui:
|
||||
image: provectuslabs/kafka-ui:latest
|
||||
container_name: wwjcloud-kafka-ui
|
||||
environment:
|
||||
KAFKA_CLUSTERS_0_NAME: wwjcloud
|
||||
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: ${KAFKA_ADVERTISED_HOST:-localhost}:9092
|
||||
ports:
|
||||
- "8082:8080"
|
||||
depends_on:
|
||||
- redpanda
|
||||
restart: unless-stopped
|
||||
|
||||
redis-commander:
|
||||
image: rediscommander/redis-commander:latest
|
||||
container_name: wwjcloud-redis-commander
|
||||
environment:
|
||||
- REDIS_HOSTS=local:redis:6379
|
||||
ports:
|
||||
- "8081:8081"
|
||||
depends_on:
|
||||
- redis
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: wwjcloud-infra
|
||||
26
tools/deploy/kong/docker-compose.yml
Normal file
26
tools/deploy/kong/docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
kong:
|
||||
image: kong:3.6
|
||||
environment:
|
||||
KONG_DATABASE: 'off'
|
||||
KONG_DECLARATIVE_CONFIG: /kong/declarative/kong.yaml
|
||||
KONG_PROXY_LISTEN: '0.0.0.0:8000, 0.0.0.0:8443 ssl'
|
||||
KONG_ADMIN_LISTEN: '0.0.0.0:8001, 0.0.0.0:8444 ssl'
|
||||
KONG_LOG_LEVEL: info
|
||||
volumes:
|
||||
- ./kong.yaml:/kong/declarative/kong.yaml:ro
|
||||
ports:
|
||||
- '8000:8000'
|
||||
- '8443:8443'
|
||||
- '8001:8001'
|
||||
- '8444:8444'
|
||||
|
||||
konga:
|
||||
image: pantsel/konga:latest
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
ports:
|
||||
- '1337:1337'
|
||||
depends_on:
|
||||
- kong
|
||||
43
tools/deploy/kong/kong.yaml
Normal file
43
tools/deploy/kong/kong.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
_format_version: '3.0'
|
||||
_transform: true
|
||||
|
||||
services:
|
||||
- name: wwjcloud-backend
|
||||
url: http://host.docker.internal:3001
|
||||
routes:
|
||||
- name: frontend-api
|
||||
paths:
|
||||
- /api
|
||||
strip_path: false
|
||||
methods: [GET, POST, PUT, PATCH, DELETE]
|
||||
- name: admin-api
|
||||
paths:
|
||||
- /adminapi
|
||||
strip_path: false
|
||||
methods: [GET, POST, PUT, PATCH, DELETE]
|
||||
plugins:
|
||||
- name: rate-limiting
|
||||
config:
|
||||
minute: 600
|
||||
policy: local
|
||||
- name: request-transformer
|
||||
config:
|
||||
add:
|
||||
headers:
|
||||
- 'x-forwarded-for: kong'
|
||||
- name: response-transformer
|
||||
- name: proxy-cache
|
||||
config:
|
||||
strategy: memory
|
||||
content_type:
|
||||
- application/json
|
||||
cache_ttl: 30
|
||||
- name: prometheus
|
||||
- name: correlation-id
|
||||
config:
|
||||
header_name: X-Request-ID
|
||||
generator: uuid
|
||||
echo_downstream: true
|
||||
- name: request-size-limiting
|
||||
config:
|
||||
allowed_payload_size: 10
|
||||
Reference in New Issue
Block a user