From 603010cbd50853826fda09639e4ccbf491111eac Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 09:03:12 +0100 Subject: [PATCH 1/4] Split up mysqli and tokenizer --- docker-compose.yml | 7 ++++--- env-example | 3 ++- php-fpm/Dockerfile-56 | 19 ++++++++++++++----- php-fpm/Dockerfile-70 | 19 ++++++++++++++----- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 49f598f..f9d0777 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,9 +56,10 @@ services: - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - - INSTALL_EXIF=${PHP_FPM_DOCKER_FILE} - - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_DOCKER_FILE} - - CODEIGNITER=${PHP_FPM_DOCKER_FILE} + - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} + - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} + - INSTALL_MYSQLI=${PHP_FPM_MYSQLI} + - INSTALL_TOKENIZER=${PHP_FPM_TOKENIZER} dockerfile: ${PHP_FPM_DOCKER_FILE} volumes_from: - applications diff --git a/env-example b/env-example index aa2a731..d95f208 100644 --- a/env-example +++ b/env-example @@ -51,7 +51,8 @@ PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false -PHP_FPM_CODEIGNITER=falses +PHP_FPM_MYSQLI=false +PHP_FPM_TOKENIZER=false # NGINX NGINX_HOST_HTTP_PORT=8080 diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index acd02b8..bb80842 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -142,13 +142,22 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### -# Codeigniter Modifications: +# Mysqli Modifications: ##################################### -ARG CODEIGNITER=false -RUN if [ ${CODEIGNITER} = true ]; then \ - # Install Codeigniter PHP extentions requirements - docker-php-ext-install mysqli && \ +ARG INSTALL_MYSQLI=false +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + # Install mysqli PHP extentions requirements + docker-php-ext-install mysqli && \ +;fi + +##################################### +# Tokenizer Modifications: +##################################### + +ARG INSTALL_TOKENIZER=false +RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ + # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 20aaf5a..c529fbb 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -176,13 +176,22 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### -# Codeigniter Modifications: +# Mysqli Modifications: ##################################### -ARG CODEIGNITER=false -RUN if [ ${CODEIGNITER} = true ]; then \ - # Install Codeigniter PHP extentions requirements - docker-php-ext-install mysqli && \ +ARG INSTALL_MYSQLI=false +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + # Install mysqli PHP extentions requirements + docker-php-ext-install mysqli && \ +;fi + +##################################### +# Tokenizer Modifications: +##################################### + +ARG INSTALL_TOKENIZER=false +RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ + # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi From 1d918a71d8e5765bfe7a127d3e59d8e99af75209 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 22:20:31 +0100 Subject: [PATCH 2/4] fixed example and docker-compose.yml --- docker-compose.yml | 4 ++-- env-example | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f9d0777..51101e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,8 +58,8 @@ services: - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} - INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} - - INSTALL_MYSQLI=${PHP_FPM_MYSQLI} - - INSTALL_TOKENIZER=${PHP_FPM_TOKENIZER} + - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} + - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} dockerfile: ${PHP_FPM_DOCKER_FILE} volumes_from: - applications diff --git a/env-example b/env-example index d95f208..3ecca97 100644 --- a/env-example +++ b/env-example @@ -51,8 +51,8 @@ PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false -PHP_FPM_MYSQLI=false -PHP_FPM_TOKENIZER=false +PHP_FPM_INSTALL_MYSQLI=false +PHP_FPM_INSTALL_TOKENIZER=false # NGINX NGINX_HOST_HTTP_PORT=8080 From 25c27685577388885fa1f50faad311d3c828dcf3 Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Mon, 6 Mar 2017 22:26:17 +0100 Subject: [PATCH 3/4] Apache should just go to /var/www not /var/www/public when supporting multiple projects --- apache2/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apache2/Dockerfile b/apache2/Dockerfile index 569ba9f..97636ed 100644 --- a/apache2/Dockerfile +++ b/apache2/Dockerfile @@ -6,11 +6,11 @@ ARG PHP_SOCKET=php-fpm:9000 ENV WEB_PHP_SOCKET=$PHP_SOCKET -ENV WEB_DOCUMENT_ROOT=/var/www/public +ENV WEB_DOCUMENT_ROOT=/var/www/ EXPOSE 80 443 -WORKDIR /var/www/public +WORKDIR /var/www/ ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"] From 36fcc6674e88ca98ada6d0e94e1bc329e4d3bdfd Mon Sep 17 00:00:00 2001 From: Marius van Zundert Date: Thu, 9 Mar 2017 09:29:07 +0100 Subject: [PATCH 4/4] Seperated mysqli and tokenizer as seperate options without putting them under code igniter --- docker-compose.yml | 2 +- php-fpm/Dockerfile-56 | 6 ++---- php-fpm/Dockerfile-70 | 7 ++----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 27ae21b..e925478 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: applications: image: tianon/true volumes: - - ${APPLICATIONS_HOST_DIR}:/var/www + - ${APPLICATIONS_HOST_DIR}:/var/www ### Workspace Utilities Container ########################### diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 1775cf6..6c63d72 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -149,9 +149,8 @@ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### ARG INSTALL_MYSQLI=false -RUN if [ ${INSTALL_MYSQLI} = true ]; then \ - # Install mysqli PHP extentions requirements - docker-php-ext-install mysqli && \ +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + docker-php-ext-install mysqli \ ;fi ##################################### @@ -160,7 +159,6 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \ ARG INSTALL_TOKENIZER=false RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ - # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index c529fbb..d0ddaf0 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -178,11 +178,9 @@ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### # Mysqli Modifications: ##################################### - ARG INSTALL_MYSQLI=false -RUN if [ ${INSTALL_MYSQLI} = true ]; then \ - # Install mysqli PHP extentions requirements - docker-php-ext-install mysqli && \ +RUN if [ ${INSTALL_MYSQLI} = true ]; then \ + docker-php-ext-install mysqli \ ;fi ##################################### @@ -191,7 +189,6 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \ ARG INSTALL_TOKENIZER=false RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ - # Install tokenizer PHP extentions requirements docker-php-ext-install tokenizer \ ;fi