]> git.leonardobizzoni.com Git - highschool-graduation-project/commitdiff
Split nginx php missing doc
authorLeonardoBizzoni <leo2002714@gmail.com>
Fri, 6 May 2022 19:28:45 +0000 (21:28 +0200)
committerLeonardoBizzoni <leo2002714@gmail.com>
Fri, 6 May 2022 19:28:45 +0000 (21:28 +0200)
dockerfiles/bll/Dockerfile
dockerfiles/docker-compose.yml
dockerfiles/web/nginx.conf
scripts/newIdol.php [deleted file]

index b826006a967c940f5793afba278c1a7b50c326e2..f32ad287a46432c3fae6cb7c5c4f72e86cb10c53 100644 (file)
@@ -1,14 +1,5 @@
-FROM php:8.1.4-fpm-alpine3.14
+FROM php:8.1.6RC1-fpm-alpine3.15
 WORKDIR /var/www/html
 
-RUN apk update && apk add --no-cache \
-    php8 \
-    php8-fpm \
-    php8-mysqli \
-    php8-pdo \
-
 RUN docker-php-ext-install pdo pdo_mysql mysqli
-
 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
-
-CMD php-fpm -D
index ec92419fa42d9b43ff5dabc1867cd0148759577e..047f48f0e5ee906df557b7aeb4e0ed2e2fb23272 100644 (file)
@@ -14,6 +14,8 @@ services:
 
   db:
     image: "mariadb"
+    volumes:
+      - ../DBfiles:/var/lib/mysql
     environment:
       MARIADB_USER: "root"
       MARIADB_ROOT_PASSWORD: "root"
index 8a5dac60b39f0969bd02d24e5abc24347e0e3f80..1fbcfbc215dc90e255dda36c68bf5216f4eccf99 100644 (file)
@@ -21,6 +21,7 @@ http {
                }
 
                location ~ \.php$ {
+                    fastcgi_read_timeout 300;
                     fastcgi_pass      app:9000;
                     fastcgi_index     index.php;
                     include           fastcgi.conf;
diff --git a/scripts/newIdol.php b/scripts/newIdol.php
deleted file mode 100644 (file)
index e9a6556..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-include_once "config.php";
-
-
-$idolPage = $_GET["idolLink"];
-
-if (str_contains($idolPage, "twitch.tv")) {
-    $idol = str_replace("https://www.twitch.tv/", "", $idolPage);
-    $url = "https://api.twitch.tv/helix/users?login=$idol";
-
-    $ch = curl_init($url);
-    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-    curl_setopt($ch, CURLOPT_TIMEOUT, 3);
-    curl_setopt($ch, CURLOPT_HTTPHEADER, [$token, $clientID]);
-
-    $result = json_decode(curl_exec($ch));
-    curl_close($ch);
-
-    $result = get_object_vars($result);
-    $result = get_object_vars($result["data"][0]);
-
-    $idolFile = fopen("../vtuber/" . $idol . ".php", "w") or die("Unable to open file!");
-    fwrite($idolFile, "<!doctype html>
-<html lang=\"en\">
-    <head>
-        <meta charset=\"UTF-8\"/>
-    <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">
-    <link rel=\"stylesheet\" href=\"../assets/css/index.css\" type=\"text/css\" media=\"screen\" />
-<title>" . $idol . "</title>
-    </head>
-<body>
-    <div id=\"parent\">
-    <div>
-    <nav class=\"navbar bg-dark text-white\">
-        <div class=\"container-fluid\">
-                <h1>" . $idol . "</h1><img class=\"idolLogo\" src=\"" . $result["profile_image_url"] . "\"/>
-        </div>
-    </nav>
-
-</div>
-
-<div id=\"child\">
-<iframe src=\"https://player.twitch.tv/?channel=".$result["login"]."&parent=localhost\" frameborder=\"0\" allowfullscreen=\"true\" scrolling=\"no\"></iframe>
-</div>
-</div>
-
-</body>
-</html>
-");
-    fclose($idolFile);
-
-    header("Location:/ProgettoAnime/vtuber.php");
-} else if (str_contains($idolPage, "youtube.com")) {
-    echo "Prima o poi";
-} else {
-    echo "wtf";
-}