fixed php-fpm install phalcon ext bug (#1811)

* add phalcon ext
* fixed phalcon install
* update index.md
* php-worker install phalcon ext
This commit is contained in:
Frank Yuan 2019-01-10 10:56:30 +08:00 committed by Shao Yu-Lung (Allen)
parent 03ff791e17
commit 04f071555c
5 changed files with 22 additions and 2 deletions

View File

@ -185,8 +185,10 @@ services:
context: ./php-worker
args:
- PHP_VERSION=${PHP_VERSION}
- PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
- INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
- INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON}
- INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP}
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
- PUID=${PHP_WORKER_PUID}

View File

@ -170,6 +170,7 @@ PHP_FPM_INSTALL_YAML=false
PHP_WORKER_INSTALL_PGSQL=false
PHP_WORKER_INSTALL_BCMATH=false
PHP_WORKER_INSTALL_PHALCON=false
PHP_WORKER_INSTALL_SOAP=false
PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
PHP_WORKER_PUID=1000

View File

@ -536,11 +536,12 @@ RUN if [ $INSTALL_PHALCON = true ]; then \
&& unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
&& ./install \
&& echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-phalcon.ini \
&& rm -rf /tmp/cphalcon* \
;fi
# Copy phalcon configration
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini
###########################################################################
# APCU:
###########################################################################

1
php-fpm/phalcon.ini Normal file
View File

@ -0,0 +1 @@
extension=phalcon.so

View File

@ -16,6 +16,7 @@ RUN apk --update add wget \
libmemcached-dev \
libmcrypt-dev \
libxml2-dev \
pcre-dev \
zlib-dev \
autoconf \
cyrus-sasl-dev \
@ -65,6 +66,20 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www
# Install Phalcon ext
ARG INSTALL_PHALCON=false
ARG PHALCON_VERSION
ENV PHALCON_VERSION ${PHALCON_VERSION}
RUN if [ $INSTALL_PHALCON = true ]; then \
apk --update add unzip gcc make re2c bash\
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${PHALCON_VERSION}/build \
&& ./install \
&& rm -rf /tmp/cphalcon* \
;fi
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration