services:
  mysql:
    image: mysql:8.0
    container_name: waoowaoo-test-mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: waoowaoo_test
      MYSQL_ROOT_HOST: "%"
    ports:
      - "3307:3306"
    command:
      - "--default-authentication-plugin=mysql_native_password"
      - "--sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
    healthcheck:
      test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -proot"]
      interval: 5s
      timeout: 5s
      retries: 30
      start_period: 15s

  redis:
    image: redis:7-alpine
    container_name: waoowaoo-test-redis
    ports:
      - "6380:6379"
    command: ["redis-server", "--appendonly", "no"]
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 5s
      retries: 30
      start_period: 5s
