services: mysql: image: mysql:8.4 container_name: talent-card-mysql restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: talent_card MYSQL_USER: talent_card MYSQL_PASSWORD: talent_card TZ: Asia/Shanghai ports: - "3307:3306" volumes: - mysql-data:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-utalent_card", "-ptalent_card"] interval: 10s timeout: 5s retries: 10 redis: image: redis:7.4 container_name: talent-card-redis restart: unless-stopped ports: - "6379:6379" volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 10 volumes: mysql-data: redis-data: