services:
  mysql:
    image: mysql:8.0
    container_name: mysql-server
    restart: always
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: root123
      MYSQL_DATABASE: agileboot_pure
    ports:
      - "3306:3306"
    volumes:
      - mysql_data:/var/lib/mysql
      - ./sql/agileboot.sql:/docker-entrypoint-initdb.d/01-agileboot.sql:ro
    networks:
      - db-network

  redis:
    image: redis:7.2-alpine
    container_name: redis-server
    restart: always
    command: redis-server --requirepass redis123
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/data
    networks:
      - db-network

volumes:
  mysql_data:
  redis_data:

networks:
  db-network:
    driver: bridge
