From c59197c8fd6285dbb1a6d43ea7186f3cf31ebac9 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 13:25:12 +0800 Subject: [PATCH 01/13] fix xhprof --- php-fpm/Dockerfile | 53 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 4f1fdbac..33a25417 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -339,31 +339,38 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ARG INSTALL_XHPROF=false -RUN if [ ${INSTALL_XHPROF} = true ]; then \ - # Install the php xhprof extension - if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \ - curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v5.0.1.tar.gz"; \ - else \ - curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \ - fi \ - && mkdir -p xhprof \ - && tar -C xhprof -zxvf /tmp/xhprof.tar.gz --strip 1 \ - && ( \ - cd xhprof \ - && phpize \ - && ./configure \ - && make \ - && make install \ - ) \ - && rm -r xhprof \ - && rm /tmp/xhprof.tar.gz \ -;fi +RUN set -eux; \ + if [ ${INSTALL_XHPROF} = true ]; then \ + # Install the php xhprof extension + if [ $(php -r "echo PHP_MAJOR_VERSION;") != 5 ]; then \ + pecl install xhprof; \ + else \ + curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \ + mkdir -p /tmp/xhprof; \ + tar -C /tmp/xhprof -zxvf /tmp/xhprof.tar.gz --strip 1; \ + ( \ + cd /tmp/xhprof/extension; \ + phpize; \ + ./configure; \ + make; \ + make install; \ + ); \ + rm -r /tmp/xhprof; \ + rm /tmp/xhprof.tar.gz; \ + fi; \ + docker-php-ext-enable xhprof; \ + php -m | grep -q 'xhprof'; \ + fi -COPY ./xhprof.ini /usr/local/etc/php/conf.d +# if [ ${INSTALL_XHPROF_USE_TIDYWAYS} = true ]; then \ +# https://github.com/tideways/php-xhprof-extension +# fi -RUN if [ ${INSTALL_XHPROF} = false ]; then \ - rm /usr/local/etc/php/conf.d/xhprof.ini \ -;fi +# COPY ./xhprof.ini /usr/local/etc/php/conf.d + +# RUN if [ ${INSTALL_XHPROF} = false ]; then \ +# rm /usr/local/etc/php/conf.d/xhprof.ini \ +# ;fi ########################################################################### # AMQP: From 2f6e89cc98d162d7b59fe2b45272218d49e61f9e Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 14:39:07 +0800 Subject: [PATCH 02/13] skip install fail extension --- .github/workflows/main-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index ecd31a73..18fbef5b 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -25,6 +25,13 @@ jobs: # sed -i -- '201,272s/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env + sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env + sed -i -- 's/GEARMAN=true/GEARMAN=false/g' .env + sed -i -- 's/AEROSPIKE=true/AEROSPIKE=false/g' .env + sed -i -- 's/PHALCON=true/PHALCON=false/g' .env + sed -i -- 's/RDKAFKA=true/RDKAFKA=false/g' .env + sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env + sed -i -- 's/YAML=true/YAML=false/g' .env docker-compose build ${{ matrix.service }} build-other: From b7a03673c1a9e9fee2c497e188d5e5035b9b3897 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 13:25:12 +0800 Subject: [PATCH 03/13] fix xhprof --- php-fpm/Dockerfile | 53 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 4f1fdbac..33a25417 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -339,31 +339,38 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ARG INSTALL_XHPROF=false -RUN if [ ${INSTALL_XHPROF} = true ]; then \ - # Install the php xhprof extension - if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \ - curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v5.0.1.tar.gz"; \ - else \ - curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \ - fi \ - && mkdir -p xhprof \ - && tar -C xhprof -zxvf /tmp/xhprof.tar.gz --strip 1 \ - && ( \ - cd xhprof \ - && phpize \ - && ./configure \ - && make \ - && make install \ - ) \ - && rm -r xhprof \ - && rm /tmp/xhprof.tar.gz \ -;fi +RUN set -eux; \ + if [ ${INSTALL_XHPROF} = true ]; then \ + # Install the php xhprof extension + if [ $(php -r "echo PHP_MAJOR_VERSION;") != 5 ]; then \ + pecl install xhprof; \ + else \ + curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \ + mkdir -p /tmp/xhprof; \ + tar -C /tmp/xhprof -zxvf /tmp/xhprof.tar.gz --strip 1; \ + ( \ + cd /tmp/xhprof/extension; \ + phpize; \ + ./configure; \ + make; \ + make install; \ + ); \ + rm -r /tmp/xhprof; \ + rm /tmp/xhprof.tar.gz; \ + fi; \ + docker-php-ext-enable xhprof; \ + php -m | grep -q 'xhprof'; \ + fi -COPY ./xhprof.ini /usr/local/etc/php/conf.d +# if [ ${INSTALL_XHPROF_USE_TIDYWAYS} = true ]; then \ +# https://github.com/tideways/php-xhprof-extension +# fi -RUN if [ ${INSTALL_XHPROF} = false ]; then \ - rm /usr/local/etc/php/conf.d/xhprof.ini \ -;fi +# COPY ./xhprof.ini /usr/local/etc/php/conf.d + +# RUN if [ ${INSTALL_XHPROF} = false ]; then \ +# rm /usr/local/etc/php/conf.d/xhprof.ini \ +# ;fi ########################################################################### # AMQP: From 6a6915d02ce9f70dca67b449ba386e001710a6be Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 14:39:07 +0800 Subject: [PATCH 04/13] skip install fail extension --- .github/workflows/main-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index ecd31a73..18fbef5b 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -25,6 +25,13 @@ jobs: # sed -i -- '201,272s/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env + sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env + sed -i -- 's/GEARMAN=true/GEARMAN=false/g' .env + sed -i -- 's/AEROSPIKE=true/AEROSPIKE=false/g' .env + sed -i -- 's/PHALCON=true/PHALCON=false/g' .env + sed -i -- 's/RDKAFKA=true/RDKAFKA=false/g' .env + sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env + sed -i -- 's/YAML=true/YAML=false/g' .env docker-compose build ${{ matrix.service }} build-other: From f77b68b11c461ba0cff9de3ca3bc5f956ffc8f10 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 15:00:32 +0800 Subject: [PATCH 05/13] Add skip install fail extension --- .github/workflows/main-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 18fbef5b..d61f80dc 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -22,7 +22,7 @@ jobs: PHP_VERSION: ${{ matrix.php_version }} run: | cp env-example .env - # sed -i -- '201,272s/=false/=true/g' .env + sed -i -- '201,272s/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env @@ -32,6 +32,7 @@ jobs: sed -i -- 's/RDKAFKA=true/RDKAFKA=false/g' .env sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env sed -i -- 's/YAML=true/YAML=false/g' .env + sed -i -- 's/MSSQL=true/MSSQL=false/g' .env docker-compose build ${{ matrix.service }} build-other: From dd29c01f9d11099c50057d829de15e56150e3795 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 15:17:11 +0800 Subject: [PATCH 06/13] Add skip install fail extension --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index d61f80dc..d4ad6b8e 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -33,6 +33,7 @@ jobs: sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env sed -i -- 's/YAML=true/YAML=false/g' .env sed -i -- 's/MSSQL=true/MSSQL=false/g' .env + sed -i -- 's/AMQP=true/AMQP=false/g' .env docker-compose build ${{ matrix.service }} build-other: From 69c4fc6f9b5519e383674a892a55f6cbcb30ab24 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 15:30:32 +0800 Subject: [PATCH 07/13] Add skip install fail extension --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index d4ad6b8e..ec89deba 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -34,6 +34,7 @@ jobs: sed -i -- 's/YAML=true/YAML=false/g' .env sed -i -- 's/MSSQL=true/MSSQL=false/g' .env sed -i -- 's/AMQP=true/AMQP=false/g' .env + sed -i -- 's/MEMCACHED=true/MEMCACHED=false/g' .env docker-compose build ${{ matrix.service }} build-other: From 0de9e6d02e83371ea183fc6d409d8d6218d8ff5d Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 15:43:57 +0800 Subject: [PATCH 08/13] change fail behavior --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index ec89deba..3e9687b5 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -12,6 +12,7 @@ jobs: build-php: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php_version: ["7.2", "7.3", "7.4", "8.0"] service: [php-fpm, php-worker, workspace, laravel-horizon] From 914ca56957a13a63f94d12b2a06975fa1d57ee43 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 15:45:00 +0800 Subject: [PATCH 09/13] Add skip install fail extension --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 3e9687b5..eca15215 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -36,6 +36,7 @@ jobs: sed -i -- 's/MSSQL=true/MSSQL=false/g' .env sed -i -- 's/AMQP=true/AMQP=false/g' .env sed -i -- 's/MEMCACHED=true/MEMCACHED=false/g' .env + sed -i -- 's/OCI8=true/OCI8=false/g' .env docker-compose build ${{ matrix.service }} build-other: From 8f68c39f1728d9454b0aa785b671cac1762ce596 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 16:23:35 +0800 Subject: [PATCH 10/13] Add skip install fail extension --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index eca15215..f190bc41 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -37,6 +37,7 @@ jobs: sed -i -- 's/AMQP=true/AMQP=false/g' .env sed -i -- 's/MEMCACHED=true/MEMCACHED=false/g' .env sed -i -- 's/OCI8=true/OCI8=false/g' .env + sed -i -- 's/IONCUBE=true/IONCUBE=false/g' .env docker-compose build ${{ matrix.service }} build-other: From 30b9034f853cd064c64ec3d67a717f98ac68582e Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 17:29:40 +0800 Subject: [PATCH 11/13] fix xmlrpc --- php-fpm/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 33a25417..f32e8a7e 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -1034,7 +1034,13 @@ RUN if [ ${INSTALL_CACHETOOL} = true ]; then \ ARG INSTALL_XMLRPC=false RUN if [ ${INSTALL_XMLRPC} = true ]; then \ - docker-php-ext-install xmlrpc \ + apt-get -yq install libxml2-dev; \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \ + pecl install xmlrpc-1.0.0RC2; \ + docker-php-ext-enable xmlrpc; \ + else \ + docker-php-ext-install xmlrpc; \ + fi \ ;fi ########################################################################### From 2edb139367428249ce04d0e2ed63727003341442 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 17:30:33 +0800 Subject: [PATCH 12/13] focuse php 8 --- .github/workflows/main-ci.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index f190bc41..42734fad 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -14,7 +14,8 @@ jobs: strategy: fail-fast: false matrix: - php_version: ["7.2", "7.3", "7.4", "8.0"] + # php_version: ["7.2", "7.3", "7.4", "8.0"] + php_version: ["8.0"] service: [php-fpm, php-worker, workspace, laravel-horizon] steps: - uses: actions/checkout@v2 @@ -40,17 +41,17 @@ jobs: sed -i -- 's/IONCUBE=true/IONCUBE=false/g' .env docker-compose build ${{ matrix.service }} - build-other: - runs-on: ubuntu-latest - strategy: - matrix: - service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo'] - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: | - cp env-example .env - sed -i -- 's/=false/=true/g' .env - sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env - sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env - docker-compose build ${{ matrix.service }} + # build-other: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo'] + # steps: + # - uses: actions/checkout@v2 + # - name: Build the Docker image + # run: | + # cp env-example .env + # sed -i -- 's/=false/=true/g' .env + # sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env + # sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env + # docker-compose build ${{ matrix.service }} From 2c3b7a762eaa9d5f23a333fc2a0709b252421788 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Wed, 17 Mar 2021 18:16:54 +0800 Subject: [PATCH 13/13] build all --- .github/workflows/main-ci.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 42734fad..ad44a60a 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -14,8 +14,7 @@ jobs: strategy: fail-fast: false matrix: - # php_version: ["7.2", "7.3", "7.4", "8.0"] - php_version: ["8.0"] + php_version: ["7.2", "7.3", "7.4", "8.0"] service: [php-fpm, php-worker, workspace, laravel-horizon] steps: - uses: actions/checkout@v2 @@ -41,17 +40,17 @@ jobs: sed -i -- 's/IONCUBE=true/IONCUBE=false/g' .env docker-compose build ${{ matrix.service }} - # build-other: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo'] - # steps: - # - uses: actions/checkout@v2 - # - name: Build the Docker image - # run: | - # cp env-example .env - # sed -i -- 's/=false/=true/g' .env - # sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env - # sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env - # docker-compose build ${{ matrix.service }} + build-other: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo'] + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: | + cp env-example .env + sed -i -- 's/=false/=true/g' .env + sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env + docker-compose build ${{ matrix.service }}