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

[Ubiquity] Fix ngx versions (#6779)

* downgrade to Ubuntu 20.04 + fix composer pbs

* fix ubiquity path

* Update ubiquity-ngx-micro.dockerfile

* fix typo

* fix php_ini_path
J-C HERON 4 éve
szülő
commit
9f97bb6acc

+ 2 - 2
frameworks/PHP/ubiquity/deploy/conf/ngx/nginx.conf

@@ -25,10 +25,10 @@ http {
     keepalive_disable none;
     keepalive_requests 100000;
 
-    php_ini_path /deploy/conf/php.ini;
+    php_ini_path /ubiquity/deploy/conf/php.ini;
 
     init_worker_by_php '
-        require "/.ubiquity/_ngx.php";
+        require "/ubiquity/.ubiquity/_ngx.php";
     ';
 
     server {

+ 11 - 10
frameworks/PHP/ubiquity/ubiquity-ngx-micro.dockerfile

@@ -9,7 +9,9 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \
                     zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
-                    php8.0-cli php8.0-dev libphp8.0-embed nginx > /dev/null
+                    php8.0-cli php8.0-dev php8.0-mbstring libphp8.0-embed nginx > /dev/null
+
+COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
 
 ADD ./ ./
 
@@ -28,26 +30,25 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
             --add-module=/ngx_php7 > /dev/null && \
     make > /dev/null && make install > /dev/null
 
-COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
-
-RUN composer config -g repo.packagist composer https://packagist.phpcomposer.com
+ADD ./ /ubiquity
+WORKDIR /ubiquity
 
 RUN composer require phpmv/ubiquity-ngx:dev-master --quiet
 
 RUN chmod 777 -R app/cache/*
 
-COPY /deploy/conf/ngx/services-micro.php /app/config/ngxServices.php
+COPY deploy/conf/ngx/services-micro.php app/config/ngxServices.php
 
 RUN composer require phpmv/ubiquity-devtools:dev-master --quiet
 
-RUN ./vendor/bin/Ubiquity bootstrap prod
+RUN /ubiquity/vendor/bin/Ubiquity bootstrap prod
 
-RUN echo "opcache.preload=/app/config/preloader.script.php" >> /deploy/conf/php.ini
-RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /deploy/conf/php.ini
+RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> deploy/conf/php.ini
+RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> deploy/conf/php.ini
 
 RUN export WORKERS=$(( 4 * $(nproc) )) && \
-    sed -i "s|worker_processes  auto|worker_processes $WORKERS|g" /deploy/conf/ngx/nginx.conf
+    sed -i "s|worker_processes  auto|worker_processes $WORKERS|g" /ubiquity/deploy/conf/ngx/nginx.conf
 
 EXPOSE 8080
 
-CMD /nginx/sbin/nginx -c /deploy/conf/ngx/nginx.conf
+CMD /nginx/sbin/nginx -c /ubiquity/deploy/conf/ngx/nginx.conf

+ 9 - 8
frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile

@@ -11,6 +11,8 @@ RUN apt-get update -yqq > /dev/null && \
                     zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
                     php8.0-cli php8.0-dev libphp8.0-embed php8.0-pgsql nginx > /dev/null
 
+COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
+
 ADD ./ ./
 
 ENV NGINX_VERSION=1.21.0
@@ -28,9 +30,8 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
             --add-module=/ngx_php7 > /dev/null && \
     make > /dev/null && make install > /dev/null
 
-COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
-
-RUN composer config -g repo.packagist composer https://packagist.phpcomposer.com
+ADD ./ /ubiquity
+WORKDIR /ubiquity
 
 RUN composer require phpmv/ubiquity-ngx:dev-master --quiet
 
@@ -38,14 +39,14 @@ RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --q
 
 RUN chmod 777 -R app/cache/*
 
-COPY /deploy/conf/ngx/pgsql/raw/ngxServices.php /app/config/ngxServices.php
+COPY deploy/conf/ngx/pgsql/raw/ngxServices.php app/config/ngxServices.php
 
-RUN echo "opcache.preload=/app/config/preloader.script.php" >> /deploy/conf/php.ini
-RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /deploy/conf/php.ini
+RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> deploy/conf/php.ini
+RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> deploy/conf/php.ini
 
 RUN export WORKERS=$(( 4 * $(nproc) )) && \
-    sed -i "s|worker_processes  auto|worker_processes $WORKERS|g" /deploy/conf/ngx/nginx.conf
+    sed -i "s|worker_processes  auto|worker_processes $WORKERS|g" /ubiquity/deploy/conf/ngx/nginx.conf
 
 EXPOSE 8080
 
-CMD /nginx/sbin/nginx -c /deploy/conf/ngx/nginx.conf
+CMD /nginx/sbin/nginx -c /ubiquity/deploy/conf/ngx/nginx.conf

+ 9 - 8
frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile

@@ -11,6 +11,8 @@ RUN apt-get update -yqq > /dev/null && \
                     zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
                     php8.0-cli php8.0-dev libphp8.0-embed php8.0-pgsql nginx > /dev/null
 
+COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
+
 ADD ./ ./
 
 ENV NGINX_VERSION=1.21.0
@@ -28,9 +30,8 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
             --add-module=/ngx_php7 > /dev/null && \
     make > /dev/null && make install > /dev/null
 
-COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
-
-RUN composer config -g repo.packagist composer https://packagist.phpcomposer.com
+ADD ./ /ubiquity
+WORKDIR /ubiquity
 
 RUN composer require phpmv/ubiquity-ngx:dev-master --quiet
 
@@ -38,14 +39,14 @@ RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --q
 
 RUN chmod 777 -R app/cache/*
 
-COPY /deploy/conf/ngx/pgsql/ngxServices.php /app/config/ngxServices.php
+COPY deploy/conf/ngx/pgsql/ngxServices.php app/config/ngxServices.php
 
-RUN echo "opcache.preload=/app/config/preloader.script.php" >> /deploy/conf/php.ini
-RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /deploy/conf/php.ini
+RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> deploy/conf/php.ini
+RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> deploy/conf/php.ini
 
 RUN export WORKERS=$(( 4 * $(nproc) )) && \
-    sed -i "s|worker_processes  auto|worker_processes $WORKERS|g" /deploy/conf/ngx/nginx.conf
+    sed -i "s|worker_processes  auto|worker_processes $WORKERS|g" /ubiquity/deploy/conf/ngx/nginx.conf
 
 EXPOSE 8080
 
-CMD /nginx/sbin/nginx -c /deploy/conf/ngx/nginx.conf
+CMD /nginx/sbin/nginx -c /ubiquity/deploy/conf/ngx/nginx.conf

+ 2 - 6
frameworks/PHP/ubiquity/ubiquity-roadrunner-mysql.dockerfile

@@ -18,18 +18,14 @@ WORKDIR /ubiquity
 
 RUN chmod -R 777 /ubiquity
 
-RUN ["chmod", "+x", "deploy/run/install-composer.sh"]
-
-RUN deploy/run/install-composer.sh
-
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq git unzip > /dev/null
 
-RUN php composer.phar require lapinskas/roadrunner-ubiquity:1.1.1 --quiet
+RUN composer require lapinskas/roadrunner-ubiquity:1.1.1 --quiet
 
 RUN vendor/bin/rr get
 
-RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 COPY deploy/roadrunner/envwrapper.sh /bin/
 RUN ln -s /ubiquity/.ubiquity/.rr.yml /ubiquity/.rr.yml

+ 2 - 7
frameworks/PHP/ubiquity/ubiquity-roadrunner.dockerfile

@@ -1,4 +1,3 @@
-  
 FROM ubuntu:20.04
 
 ARG DEBIAN_FRONTEND=noninteractive
@@ -20,18 +19,14 @@ WORKDIR /ubiquity
 
 RUN chmod -R 777 /ubiquity
 
-RUN ["chmod", "+x", "deploy/run/install-composer.sh"]
-
-RUN deploy/run/install-composer.sh
-
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq git unzip > /dev/null
 
-RUN php composer.phar require lapinskas/roadrunner-ubiquity:1.1.1 --quiet
+RUN composer require lapinskas/roadrunner-ubiquity:1.1.1 --quiet
 
 RUN vendor/bin/rr get
 
-RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 COPY deploy/roadrunner/envwrapper.sh /bin/
 RUN ln -s /ubiquity/.ubiquity/.rr.yml /ubiquity/.rr.yml

+ 2 - 7
frameworks/PHP/ubiquity/ubiquity-workerman-mongo.dockerfile

@@ -1,4 +1,3 @@
-  
 FROM ubuntu:20.04
 
 ARG DEBIAN_FRONTEND=noninteractive
@@ -21,16 +20,12 @@ WORKDIR /ubiquity
 
 RUN chmod -R 777 /ubiquity
 
-RUN ["chmod", "+x", "deploy/run/install-composer.sh"]
-
-RUN deploy/run/install-composer.sh
-
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq git unzip > /dev/null
 
-RUN php composer.phar require phpmv/ubiquity:dev-nosql-prepare phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master phpmv/ubiquity-nosql:dev-master --quiet
+RUN composer require phpmv/ubiquity:dev-nosql-prepare phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master phpmv/ubiquity-nosql:dev-master --quiet
 
-RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 RUN chmod 777 -R /ubiquity/.ubiquity/*
 

+ 2 - 6
frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile

@@ -19,16 +19,12 @@ WORKDIR /ubiquity
 
 RUN chmod -R 777 /ubiquity
 
-RUN ["chmod", "+x", "deploy/run/install-composer.sh"]
-
-RUN deploy/run/install-composer.sh
-
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq git unzip > /dev/null
 
-RUN php composer.phar require phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master --quiet
+RUN composer require phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master --quiet
 
-RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 RUN chmod 777 -R /ubiquity/.ubiquity/*
 

+ 2 - 7
frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile

@@ -1,4 +1,3 @@
-  
 FROM ubuntu:20.04
 
 ARG DEBIAN_FRONTEND=noninteractive
@@ -20,16 +19,12 @@ WORKDIR /ubiquity
 
 RUN chmod -R 777 /ubiquity
 
-RUN ["chmod", "+x", "deploy/run/install-composer.sh"]
-
-RUN deploy/run/install-composer.sh
-
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq git unzip > /dev/null
 
-RUN php composer.phar require phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master --quiet
+RUN composer require phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master --quiet
 
-RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 RUN chmod 777 -R /ubiquity/.ubiquity/*
 

+ 2 - 7
frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile

@@ -1,4 +1,3 @@
-  
 FROM ubuntu:20.04
 
 ARG DEBIAN_FRONTEND=noninteractive
@@ -20,16 +19,12 @@ WORKDIR /ubiquity
 
 RUN chmod -R 777 /ubiquity
 
-RUN ["chmod", "+x", "deploy/run/install-composer.sh"]
-
-RUN deploy/run/install-composer.sh
-
 RUN apt-get update -yqq > /dev/null && \
     apt-get install -yqq git unzip > /dev/null
 
-RUN php composer.phar require phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master --quiet
+RUN composer require phpmv/ubiquity-devtools:dev-master phpmv/ubiquity-workerman:dev-master --quiet
 
-RUN php composer.phar install --optimize-autoloader --classmap-authoritative --no-dev --quiet
+RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
 RUN chmod 777 -R /ubiquity/.ubiquity/*
 

+ 1 - 1
frameworks/PHP/ubiquity/ubiquity.dockerfile

@@ -27,4 +27,4 @@ RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php
 EXPOSE 8080
 
 CMD service php8.0-fpm start && \
-    nginx -c /ubiquity/deploy/nginx.conf -g "daemon off;"
+    nginx -c /ubiquity/deploy/nginx.conf -g "daemon off;"