feat(admin-portal): docker 本地测试通过 + 下游工作清单

docker Desktop 本地验证:
- 镜像构建成功(edu/admin-portal:test)
- 容器运行正常(端口 4003)
- /api/health、/api/ready、/login、/admin/dashboard 全部 200

修复项:
- next.config.js 添加 output: standalone
- package.json 添加 autoprefixer 依赖
- login/layout.tsx 提供 AuthProvider/ToastProvider

部署配置:
- docker-compose.deploy.yml 添加 admin-portal 服务
- deploy.env.example 添加 ADMIN_PORTAL_PORT

下游工作清单(nextstep.md):
- api-gateway: 缺 /api/admin/graphql 路由
- teacher-bff: 缺 16 Query + 11 Mutation
- iam: 缺 BatchGetUsers 等 RPC
This commit is contained in:
SpecialX
2026-07-13 16:19:35 +08:00
parent 18d94c0cc2
commit 64b2016fa8
7 changed files with 882 additions and 0 deletions

View File

@@ -315,6 +315,40 @@ services:
- edu-net
- edu-shared
admin-portal:
build:
context: ./repo
dockerfile: apps/admin-portal/Dockerfile
container_name: edu-admin-portal
restart: unless-stopped
environment:
NODE_ENV: production
PORT: 4003
API_GATEWAY_URL: http://api-gateway:8080
# 生产环境强制关闭 mock使用真实后端
NEXT_PUBLIC_API_MOCKING: "disabled"
NEXT_PUBLIC_MF_ENABLED: "false"
NEXT_PUBLIC_SHELL_URL: http://admin-portal:4003
NEXT_PUBLIC_WS_URL: ws://push-gateway:8081/ws
NEXT_PUBLIC_OTEL_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}
NEXT_PUBLIC_WEB_VITALS_ENDPOINT: /api/admin/web-vitals
ports:
- "${ADMIN_PORTAL_PORT:-4003}:4003"
depends_on:
api-gateway:
condition: service_healthy
teacher-bff:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--spider", "http://localhost:4003/api/ready"]
interval: 30s
timeout: 5s
start_period: 20s
retries: 3
networks:
- edu-net
- edu-shared
networks:
# 应用服务内部网络
edu-net: