services: # 只启动数据库,Go 和 Python 在本地运行 db: image: mysql:8.0 container_name: x-agents-mysql environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: x_agents MYSQL_USER: xagents MYSQL_PASSWORD: xagents123 volumes: - mysql-data:/var/lib/mysql ports: - "3306:3306" healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped command: --default-authentication-plugin=mysql_native_password redis: image: redis:7-alpine container_name: x-agents-redis ports: - "6379:6379" volumes: - redis-data:/data restart: unless-stopped volumes: mysql-data: redis-data: