services:
  testing:
    profiles:
      - testing
    container_name: incoviba_tests
    build: .
    restart: unless-stopped
    env_file:
      - ${APP_PATH:-.}/.test.env
      - ./.key.env
    volumes:
      - ${APP_PATH:-.}/:/code
      - ./logs/test:/logs
    command: [ '/code/bin/phpunit-watcher', 'watch' ]
    depends_on:
      - test-db

  test-db:
    profiles:
      - testing
    image: mysql:5.7
    container_name: incoviba_test_db
    restart: unless-stopped
    env_file: ${APP_PATH:-.}/.test.db.env
    volumes:
      - test-db:/var/lib/mysql
    networks:
      - default
      - adminer_network

volumes:
    test-db: {}

networks:
  adminer_network: {}
