Files
aiops/docker-compose.yml
T
attacker 732974d152 refactor: unify kubernetes_ table prefix, merge CI/CD models, LLM session support
- Rename container_clusters → kubernetes_clusters, container_topology_layouts → kubernetes_topology_layouts
- LLM: add session_id to chat history for multi-turn conversation support
- CI/CD: add pipeline_id, deploy_type, artifact_url, k8s_cluster_id to AppRelease
- Cleanup: remove deprecated playbook handler, simplify automation models
- Database: optimize auto-migrate model list
- Frontend: AIOps assistant improvements, api.ts updates
2026-06-19 15:01:54 +00:00

102 lines
2.5 KiB
YAML

services:
# ======================== MySQL 数据库 ========================
mysql:
image: mysql:8.0
container_name: aiops-mysql
hostname: aiops-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-CHANGE_ME}
MYSQL_DATABASE: ${MYSQL_DATABASE:-aiops}
MYSQL_USER: ${MYSQL_USER:-aiops}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-CHANGE_ME}
TZ: Asia/Shanghai
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
command: >
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
networks:
- aiops-network
# ======================== Redis 缓存 ========================
redis:
image: redis:7-alpine
container_name: aiops-redis
hostname: aiops-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- aiops-network
# ======================== Go 后端服务 ========================
backend:
build:
context: .
dockerfile: backend/Dockerfile
args:
VERSION: ${VERSION:-dev}
BUILD_TIME: ${BUILD_TIME:-unknown}
container_name: aiops-backend
hostname: aiops-backend
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./backend/config.yaml:/app/config.yaml
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- aiops-network
# ======================== React 前端 + Nginx ========================
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: aiops-frontend
hostname: aiops-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
networks:
- aiops-network
volumes:
mysql_data:
redis_data:
networks:
aiops-network:
driver: bridge