Forráskód Böngészése

Merge branch 'master' of https://github.com/unacms/una

AntonLV 1 éve
szülő
commit
68bce3bd99

+ 49 - 0
.vscode/launch.json

@@ -0,0 +1,49 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Listen for Xdebug",
+            "type": "php",
+            "request": "launch",
+            "port": 9003,
+            "pathMappings": {
+                "/opt/una": "${workspaceFolder}"
+            },
+            "log": true
+        }/*,
+        {
+            "name": "Launch currently open script",
+            "type": "php",
+            "request": "launch",
+            "program": "${file}",
+            "cwd": "${fileDirname}",
+            "port": 0,
+            "runtimeArgs": [
+                "-dxdebug.start_with_request=yes"
+            ],
+            "env": {
+                "XDEBUG_MODE": "debug,develop",
+                "XDEBUG _CONFIG": "client_port=${port}"
+            }
+        },
+        {
+            "name": "Launch Built-in web server",
+            "type": "php",
+            "request": "launch",
+            "runtimeArgs": [
+                "-dxdebug.mode=debug",
+                "-dxdebug.start_with_request=yes",
+                "-S",
+                "localhost:0"
+            ],
+            "program": "",
+            "cwd": "${workspaceRoot}",
+            "port": 9003,
+            "serverReadyAction": {
+                "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
+                "uriFormat": "http://localhost:%s",
+                "action": "openExternally"
+            }
+        }*/
+    ]
+}

+ 14 - 0
.vscode/settings.json

@@ -0,0 +1,14 @@
+{
+    "files.exclude": {
+        "upgrade": true,
+        "**/updates": true
+    },
+    "search.exclude": {
+        "upgrade": true,
+        "**/updates": true
+    },
+    "files.watcherExclude": {
+        "upgrade": true,
+        "**/updates": true
+    }
+}

+ 3 - 3
composer.json

@@ -40,9 +40,9 @@
             "type": "package",
             "type": "package",
             "package": {
             "package": {
                 "name": "ffmpeg/ffmpeg",
                 "name": "ffmpeg/ffmpeg",
-                "version": "4.4.0",
+                "version": "6.0.0",
                 "dist": {
                 "dist": {
-                    "url": "https://github.com/eugeneware/ffmpeg-static/releases/download/b4.4/linux-x64",
+                    "url": "https://github.com/eugeneware/ffmpeg-static/releases/download/b6.0/ffmpeg-linux-x64",
                     "type": "file"
                     "type": "file"
                 }
                 }
             }
             }
@@ -106,7 +106,7 @@
             "@relocate-ffmpeg"
             "@relocate-ffmpeg"
         ],
         ],
         "relocate-ffmpeg": [
         "relocate-ffmpeg": [
-            "test -f ./plugins/ffmpeg/ffmpeg/linux-x64 && mv ./plugins/ffmpeg/ffmpeg/linux-x64 ./plugins/ffmpeg/ffmpeg.exe && rm -rf ./plugins/ffmpeg/ffmpeg || true",
+            "test -f ./plugins/ffmpeg/ffmpeg/ffmpeg-linux-x64 && mv ./plugins/ffmpeg/ffmpeg/ffmpeg-linux-x64 ./plugins/ffmpeg/ffmpeg.exe && rm -rf ./plugins/ffmpeg/ffmpeg || true",
             "patch -p1 < patches/plugins_tpyo_amazon-s3-php-class.txt"
             "patch -p1 < patches/plugins_tpyo_amazon-s3-php-class.txt"
         ]
         ]
     }
     }

+ 10 - 10
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
         "This file is @generated automatically"
     ],
     ],
-    "content-hash": "9e4ed3470283527d25bcc5fd9d5d19fa",
+    "content-hash": "4007b8cfe61b13cc8cba93adfa13a0b5",
     "packages": [
     "packages": [
         {
         {
             "name": "achingbrain/php5-akismet",
             "name": "achingbrain/php5-akismet",
@@ -215,16 +215,16 @@
         },
         },
         {
         {
             "name": "chargebee/chargebee-php",
             "name": "chargebee/chargebee-php",
-            "version": "v3.44.0",
+            "version": "v3.45.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/chargebee/chargebee-php.git",
                 "url": "https://github.com/chargebee/chargebee-php.git",
-                "reference": "3ba52efe3657ae32aa2287a831225b76d2a7918f"
+                "reference": "183c1df738c3125bd8fc8dd1cb38a71a638eb433"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/3ba52efe3657ae32aa2287a831225b76d2a7918f",
-                "reference": "3ba52efe3657ae32aa2287a831225b76d2a7918f",
+                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/183c1df738c3125bd8fc8dd1cb38a71a638eb433",
+                "reference": "183c1df738c3125bd8fc8dd1cb38a71a638eb433",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -258,9 +258,9 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/chargebee/chargebee-php/issues",
                 "issues": "https://github.com/chargebee/chargebee-php/issues",
-                "source": "https://github.com/chargebee/chargebee-php/tree/v3.44.0"
+                "source": "https://github.com/chargebee/chargebee-php/tree/v3.45.0"
             },
             },
-            "time": "2025-06-19T11:02:22+00:00"
+            "time": "2025-07-21T13:15:39+00:00"
         },
         },
         {
         {
             "name": "curl/cacert",
             "name": "curl/cacert",
@@ -385,10 +385,10 @@
         },
         },
         {
         {
             "name": "ffmpeg/ffmpeg",
             "name": "ffmpeg/ffmpeg",
-            "version": "4.4.0",
+            "version": "6.0.0",
             "dist": {
             "dist": {
                 "type": "file",
                 "type": "file",
-                "url": "https://github.com/eugeneware/ffmpeg-static/releases/download/b4.4/linux-x64"
+                "url": "https://github.com/eugeneware/ffmpeg-static/releases/download/b6.0/ffmpeg-linux-x64"
             },
             },
             "type": "library"
             "type": "library"
         },
         },
@@ -1699,7 +1699,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/snipe/banbuilder/issues",
                 "issues": "https://github.com/snipe/banbuilder/issues",
-                "source": "https://github.com/snipe/banbuilder/tree/master"
+                "source": "https://github.com/snipe/banbuilder/tree/2.3.1"
             },
             },
             "time": "2023-12-06T20:33:58+00:00"
             "time": "2023-12-06T20:33:58+00:00"
         },
         },

+ 30 - 8
docker-compose.yml

@@ -1,5 +1,6 @@
 version: '3'
 version: '3'
 services:
 services:
+
     web:
     web:
         image: nginx:latest
         image: nginx:latest
         ports:
         ports:
@@ -7,8 +8,11 @@ services:
         volumes:
         volumes:
             - ./scripts/docker-compose/nginx.conf:/etc/nginx/conf.d/default.conf
             - ./scripts/docker-compose/nginx.conf:/etc/nginx/conf.d/default.conf
             - ./:/opt/una
             - ./:/opt/una
-        depends_on:
-            - php
+        networks:
+            unanet:
+                aliases:
+                    - example.local
+
     php:
     php:
         build:
         build:
             context: .
             context: .
@@ -16,17 +20,23 @@ services:
         volumes:
         volumes:
             - ./scripts/docker-compose/php.ini:/usr/local/etc/php/php.ini
             - ./scripts/docker-compose/php.ini:/usr/local/etc/php/php.ini
             - ./:/opt/una
             - ./:/opt/una
-        depends_on:
-            - mysql
+        extra_hosts:
+            - "host.docker.internal:host-gateway"
+        networks:
+            - unanet
+
     cron:
     cron:
         build:
         build:
             context: .
             context: .
             dockerfile: scripts/docker-compose/Cron.Dockerfile
             dockerfile: scripts/docker-compose/Cron.Dockerfile
         volumes:
         volumes:
-            - ./scripts/docker-compose/php.ini:/usr/local/etc/php/php.ini
+            - ./scripts/docker-compose/php.ini:/usr/local/etc/php/php-cron.ini
             - ./:/opt/una
             - ./:/opt/una
-        depends_on:
-            - mysql
+        extra_hosts:
+            - "host.docker.internal:host-gateway"
+        networks:
+            - unanet
+
     mysql:
     mysql:
         image: mariadb:latest
         image: mariadb:latest
         environment:
         environment:
@@ -40,11 +50,17 @@ services:
             - ./scripts/docker-compose/mysqld.cnf:/etc/mysql/conf.d/mysqld.cnf
             - ./scripts/docker-compose/mysqld.cnf:/etc/mysql/conf.d/mysqld.cnf
         ports:
         ports:
             - 3306:3306
             - 3306:3306
+        networks:
+            - unanet
+
     jot:
     jot:
         image: unaio/jot-server:latest
         image: unaio/jot-server:latest
         restart: always
         restart: always
         ports:
         ports:
-            - 5000:5000
+            - 5555:5000
+        networks:
+            - unanet
+
     phpmyadmin:
     phpmyadmin:
         image: phpmyadmin
         image: phpmyadmin
         restart: always
         restart: always
@@ -59,5 +75,11 @@ services:
             - ./scripts/docker-compose/phpmyadmin.inc.php:/etc/phpmyadmin/config.user.inc.php
             - ./scripts/docker-compose/phpmyadmin.inc.php:/etc/phpmyadmin/config.user.inc.php
         depends_on:
         depends_on:
             - mysql
             - mysql
+        networks:
+            - unanet
+
 volumes:
 volumes:
     mysqldata: {}
     mysqldata: {}
+
+networks:
+  unanet:

+ 3 - 2
scripts/docker-compose/Cron.Dockerfile

@@ -1,6 +1,7 @@
 FROM php:8.3-cli
 FROM php:8.3-cli
 
 
 RUN apt-get update && apt-get install -y \
 RUN apt-get update && apt-get install -y \
+        wget \
         cron \
         cron \
         libfreetype6-dev \
         libfreetype6-dev \
         libjpeg62-turbo-dev \
         libjpeg62-turbo-dev \
@@ -12,11 +13,11 @@ RUN apt-get update && apt-get install -y \
         unzip \
         unzip \
     && docker-php-ext-configure gd --with-freetype --with-jpeg \
     && docker-php-ext-configure gd --with-freetype --with-jpeg \
     && docker-php-ext-install -j$(nproc) gd \
     && docker-php-ext-install -j$(nproc) gd \
-    && docker-php-ext-install -j$(nproc) pdo pdo_mysql \
+    && docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \
     && docker-php-ext-install -j$(nproc) zip exif opcache iconv mbstring \
     && docker-php-ext-install -j$(nproc) zip exif opcache iconv mbstring \
 #    && pecl install xdebug && docker-php-ext-enable xdebug \
 #    && pecl install xdebug && docker-php-ext-enable xdebug \
 #    && pecl install mcrypt-1.0.4 && docker-php-ext-enable mcrypt \
 #    && pecl install mcrypt-1.0.4 && docker-php-ext-enable mcrypt \
-    && pecl install imagick-3.7.0 && docker-php-ext-enable imagick
+    && pecl install imagick-3.8.0 && docker-php-ext-enable imagick
 
 
 RUN echo "* * * * * /usr/local/bin/php -c /usr/local/etc/php /opt/una/periodic/cron.php 2>&1 | sed -e \"s/\(.*\)/[\`date\`] \1/\" >>/var/log/unacron.log" > /tmp/crontab && crontab /tmp/crontab && rm -f /tmp/crontab
 RUN echo "* * * * * /usr/local/bin/php -c /usr/local/etc/php /opt/una/periodic/cron.php 2>&1 | sed -e \"s/\(.*\)/[\`date\`] \1/\" >>/var/log/unacron.log" > /tmp/crontab && crontab /tmp/crontab && rm -f /tmp/crontab
 
 

+ 3 - 3
scripts/docker-compose/PHP.Dockerfile

@@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y \
     && docker-php-ext-install -j$(nproc) gd \
     && docker-php-ext-install -j$(nproc) gd \
     && docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \
     && docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \
     && docker-php-ext-install -j$(nproc) zip exif opcache iconv mbstring \
     && docker-php-ext-install -j$(nproc) zip exif opcache iconv mbstring \
-#    && pecl install xdebug && docker-php-ext-enable xdebug \
-#    && pecl install mcrypt-1.0.3 && docker-php-ext-enable mcrypt \
-    && pecl install imagick-3.7.0 && docker-php-ext-enable imagick
+    && pecl install xdebug && docker-php-ext-enable xdebug \
+#    && pecl install mcrypt-1.0.4 && docker-php-ext-enable mcrypt \
+    && pecl install imagick-3.8.0 && docker-php-ext-enable imagick
 
 

+ 0 - 21
scripts/docker-compose/PHP7.Dockerfile

@@ -1,21 +0,0 @@
-FROM php:7.4-fpm
-
-RUN apt-get update && apt-get install -y \
-        git \
-        cron \
-        libfreetype6-dev \
-        libjpeg62-turbo-dev \
-        libmcrypt-dev \
-        libpng-dev \
-        libonig-dev \
-        libmagickwand-dev \
-        libzip-dev \
-        unzip \
-    && docker-php-ext-configure gd --with-freetype --with-jpeg \
-    && docker-php-ext-install -j$(nproc) gd \
-    && docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \
-    && docker-php-ext-install -j$(nproc) zip exif opcache iconv mbstring \
-#    && pecl install xdebug && docker-php-ext-enable xdebug \
-#    && pecl install mcrypt-1.0.3 && docker-php-ext-enable mcrypt \
-    && pecl install imagick-3.7.0 && docker-php-ext-enable imagick
-

+ 22 - 0
scripts/docker-compose/php-cron.ini

@@ -0,0 +1,22 @@
+memory_limit=-1
+upload_max_filesize=200M
+post_max_size=200M
+html_errors = On
+error_prepend_string = "<pre style='white-space: pre-line'>"
+error_append_string = "</pre>"
+max_input_vars = 5000
+error_log = /var/log/php.log
+variables_order=GPCSE
+
+[opcache]
+opcache.enable=1
+opcache.revalidate_freq=0
+opcache.validate_timestamps=1
+opcache.max_accelerated_files=100000
+opcache.memory_consumption=72
+opcache.max_wasted_percentage=20
+opcache.interned_strings_buffer=16
+opcache.fast_shutdown=1
+
+[xdebug]
+xdebug.mode = develop

+ 7 - 1
scripts/docker-compose/php.ini

@@ -1,4 +1,4 @@
-memory_limit=-1
+memory_limit=192M
 upload_max_filesize=200M
 upload_max_filesize=200M
 post_max_size=200M
 post_max_size=200M
 html_errors = On
 html_errors = On
@@ -17,3 +17,9 @@ opcache.memory_consumption=72
 opcache.max_wasted_percentage=20
 opcache.max_wasted_percentage=20
 opcache.interned_strings_buffer=16
 opcache.interned_strings_buffer=16
 opcache.fast_shutdown=1
 opcache.fast_shutdown=1
+
+[xdebug]
+xdebug.mode = debug
+xdebug.start_with_request = yes
+xdebug.client_host = host.docker.internal
+