diff --git a/app/Services/CloudflareSolverService.php b/app/Services/CloudflareSolverService.php index 2d5ea990..f4fcbd9b 100644 --- a/app/Services/CloudflareSolverService.php +++ b/app/Services/CloudflareSolverService.php @@ -17,7 +17,7 @@ class CloudflareSolverService { /** * set in .env - * FLARESOLVERR_IP_DOCKER="http://flaresolverr:8191/v1" + * FLARESOLVERR_IP_DOCKER="http://192.168.178.187:8191/v1" */ $this->solverUrl = env('FLARESOLVERR_IP_DOCKER', 'http://flaresolverr:8191/v1'); @@ -42,9 +42,9 @@ class CloudflareSolverService dd($data); } - $tmp = json_encode($data); - // if (strpos($tmp, "reason") !== false && strpos($tmp, 403) !== false) - // dd($data); + if (strpos($data['solution']['response'], '"code": 403, "reason": "challenge"') !== false) { + dd($data); + } if (isset($data['status']) && $data['status'] === 'ok') { $htmlContent = $data['solution']['response']; diff --git a/app/Traits/Sofascore/GrapperEvent.php b/app/Traits/Sofascore/GrapperEvent.php index 0da16d17..cedc2d02 100644 --- a/app/Traits/Sofascore/GrapperEvent.php +++ b/app/Traits/Sofascore/GrapperEvent.php @@ -30,7 +30,7 @@ trait GrapperEvent Notice::note($url, 'b'); } - $this->sleep(1); + $this->sleep(2); $cloudflareService = new CloudflareSolverService; diff --git a/app/Traits/Sofascore/GrappingHelper.php b/app/Traits/Sofascore/GrappingHelper.php index 3be0bd64..bb709155 100644 --- a/app/Traits/Sofascore/GrappingHelper.php +++ b/app/Traits/Sofascore/GrappingHelper.php @@ -231,12 +231,12 @@ trait GrappingHelper if (! $this->force && $has) { if ($this->debug) { - Notice::note("tournaments $day for " . strtoupper($slug) . ' allready grapped', 'bb'); + Notice::note("$day tournaments allready grapped", 'br'); } } else { if ($this->debug) { - Notice::note("grappig tournaments for $day", 'bb'); + Notice::note("$day tournaments loaded", 'bb'); } $page = 1; @@ -363,9 +363,6 @@ trait GrappingHelper } } } - if ($this->debug) { - Notice::note('days tournament done', 'g'); - } } protected function get_tree(string $dir, &$results = []) diff --git a/docker/docker-ugreen.yml b/docker/docker-ugreen.yml new file mode 100644 index 00000000..2f484b74 --- /dev/null +++ b/docker/docker-ugreen.yml @@ -0,0 +1,80 @@ +services: + # 1. PHP Laravel App (Nutzt jetzt das lokale Dockerfile aus dem letzten Schritt) + laravel-app: + build: /volume2/laravel-stack/ + container_name: laravel-app + restart: unless-stopped + volumes: + - /volume2/laravel-stack/app:/var/www/html + networks: + - laravel-network + + # 2. Der Laravel-Scheduler + laravel-scheduler: + build: /volume2/laravel-stack/ + container_name: laravel-scheduler + restart: unless-stopped + volumes: + - /volume2/laravel-stack/app:/var/www/html + command: php /var/www/html/artisan schedule:work + depends_on: + - laravel-app + networks: + - laravel-network + + # 3. Caddy Webserver + caddy: + image: caddy:2-alpine + container_name: caddy-server + restart: unless-stopped + ports: + - "8080:80" + - "8443:443" + volumes: + - /volume2/laravel-stack/caddy/Caddyfile:/etc/caddy/Caddyfile + - caddy_data:/data # Verwaltet durch Docker (Sicher vor Rechteregeln) + - /volume2/laravel-stack/app:/var/www/html + depends_on: + - laravel-app + networks: + - laravel-network + + # 4. MariaDB Datenbank (Port 3306 offen für Ihren Import!) + mariadb: + image: mariadb:11-noble + container_name: mariadb-db + restart: unless-stopped + ports: + - "3306:3306" + environment: + MYSQL_ROOT_PASSWORD: salam + MYSQL_DATABASE: nuhodds_fi4 + MYSQL_USER: root + MYSQL_PASSWORD: salam + volumes: + - mariadb_data:/var/lib/mysql # Verwaltet durch Docker (Sicher vor Rechteregeln) + networks: + - laravel-network + + # 5. MongoDB Datenbank + mongodb: + image: mongo:latest + container_name: mongodb-db + restart: unless-stopped + user: "0:0" + ports: + - "27017:27017" + volumes: + - mongo_nopass_data:/data/db # Verwaltet durch Docker (Sicher vor Rechteregeln) + networks: + - laravel-network + +networks: + laravel-network: + driver: bridge + +# Hier weisen wir Docker an, die Ordner im geschützten Docker-Speicher zu erstellen +volumes: + mariadb_data: + mongo_nopass_data: + caddy_data: