From 6cc58de67ed6010cf2ee1cc61e88c858040f1abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luciano=20Gon=C3=A7alves?= Date: Sun, 4 Sep 2016 14:50:03 +0100 Subject: [PATCH 1/9] Add aerospike extension installation on phpfpm-56 as well --- php-fpm/Dockerfile-56 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index ea390a1c..3b7dd453 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -83,6 +83,28 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ docker-php-ext-enable memcached \ ;fi +##################################### +# PHP Aerospike: +##################################### + +ARG INSTALL_AEROSPIKE_EXTENSION=true +ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} +# Copy aerospike configration for remote debugging +COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini +RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ + # Install the php aerospike extension + curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ + && mkdir -p aerospike-client-php \ + && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ + && ( \ + cd aerospike-client-php/src/aerospike \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + && rm /tmp/aerospike-client-php.tar.gz \ +;fi + ##################################### # Opcache: ##################################### From a1a5b3d49f3c192bf1deb06720ac84699d40ccd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A8=B1=E7=9B=8A=E9=8A=98?= Date: Tue, 6 Sep 2016 17:46:14 +0800 Subject: [PATCH 2/9] modify words in Chinese let words look like smooth and replace wrong word in Chinese. --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index 4691e127..7ac5061b 100644 --- a/README-zh.md +++ b/README-zh.md @@ -219,7 +219,7 @@ docker-compose up -d nginx mysql `nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`. -**说明**: `workspace` 和 `php-fpm` 将运行在大部分实例中, 所有不用在命令中 `up`加上它们. +**说明**: `workspace` 和 `php-fpm` 将运行在大部分实例中, 所以不需要在 `up` 命令中加上它们. From d538274a0f19e640a186c3feba05f24ee6917142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luciano=20Gon=C3=A7alves?= Date: Tue, 6 Sep 2016 23:43:03 +0100 Subject: [PATCH 3/9] Add vue-cli on workspace npm global installers --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 96bc3877..5b447aa9 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -154,7 +154,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \ nvm install ${NODE_VERSION} && \ nvm use ${NODE_VERSION} && \ nvm alias ${NODE_VERSION} && \ - npm install -g gulp bower \ + npm install -g gulp bower vue-cli \ ;fi # Wouldn't execute when added to the RUN statement in the above block From 8c392e94f2851884cc8c5246816c45bc5cf5b476 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 7 Sep 2016 15:18:54 +0800 Subject: [PATCH 4/9] Support ElasticSearch Container. Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 13 +++++++++++++ elasticsearch/Dockerfile | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 elasticsearch/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 948e5769..9e68b633 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -272,6 +272,18 @@ services: links: - postgres +### ElasticSearch Container ################################## + + elasticsearch: + build: ./elasticsearch + volumes_from: + - volumes_data + ports: + - "9200:9200" + - "9300:9300" + links: + - php-fpm + ### Laravel Application Code Container ###################### volumes_source: @@ -295,5 +307,6 @@ services: - ./data/mongo:/data/db - ./data/aerospike:/opt/aerospike/data - ./data/sessions:/sessions + - ./data/elasticsearch/data:/usr/share/elasticsearch/data ### Add more Containers below ############################### diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile new file mode 100644 index 00000000..363932e4 --- /dev/null +++ b/elasticsearch/Dockerfile @@ -0,0 +1,5 @@ +FROM elasticsearch:latest + +MAINTAINER Bo-Yi Wu + +EXPOSE 9200 9300 From 907c694834cfafc82f925a02c4f1f066eb76f96c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 7 Sep 2016 16:44:33 +0800 Subject: [PATCH 5/9] update readme for ElasticSearch. Signed-off-by: Bo-Yi Wu --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29c9e509..38a6c9e6 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant. - [Use Mongo](#Use-Mongo) - [Use phpMyAdmin](#Use-phpMyAdmin) - [Use pgAdmin](#Use-pgAdmin) + - [Use ElasticSearch](#Use-ElasticSearch) - [PHP](#PHP) - [Install PHP Extensions](#Install-PHP-Extensions) - [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version) @@ -136,6 +137,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...) - phpMyAdmin - pgAdmin + - ElasticSearch >If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :) @@ -253,7 +255,7 @@ docker-compose up -d nginx mysql You can select your own combination of Containers form the list below: -`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`. +`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`, `elasticsearch`. **Note**: `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. @@ -741,6 +743,19 @@ docker-compose up -d postgres pgadmin 2 - Open your browser and visit the localhost on port **5050**: `http://localhost:5050` +
+ +### Use ElasticSearch + +1 - Run the ElasticSearch Container (`elasticsearch`) with the `docker-compose up` command. Example: + +```bash +docker-compose up -d elasticsearch +``` + +2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200` + +
From da6face95ec364796089bc917b2f953240a488ad Mon Sep 17 00:00:00 2001 From: Lialosiu Date: Fri, 9 Sep 2016 10:21:33 +0800 Subject: [PATCH 6/9] add build options MAX_ALLOWED_PACKET to mysql --- docker-compose.yml | 5 ++++- mysql/Dockerfile | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9e68b633..0303a811 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -101,7 +101,10 @@ services: ### MySQL Container ######################################### mysql: - build: ./mysql + build: + context: ./mysql + args: + - MAX_ALLOWED_PACKET=20M volumes_from: - volumes_data ports: diff --git a/mysql/Dockerfile b/mysql/Dockerfile index ae60244f..c5451ef9 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -2,6 +2,12 @@ FROM mysql:latest MAINTAINER Mahmoud Zalt +ARG MAX_ALLOWED_PACKET=1M +ENV MAX_ALLOWED_PACKET ${MAX_ALLOWED_PACKET} + +# Set MAX_ALLOWED_PACKET to /etc/mysql/my.cnf +RUN sed -i "s/^\[mysqld\]$/\[mysqld\]\nmax_allowed_packet = ${MAX_ALLOWED_PACKET}/g" /etc/mysql/my.cnf + CMD ["mysqld"] EXPOSE 3306 From 3a5100097ab0eb9144c385a1e516ac9a54077bdf Mon Sep 17 00:00:00 2001 From: Lialosiu Date: Sat, 10 Sep 2016 16:53:15 +0800 Subject: [PATCH 7/9] fix php warning "Unable to load dynamic library '/usr/lib/php/20151012/aerospike.so'" when aerospike set not install at workspace --- workspace/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 5b447aa9..9e9baad4 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -186,6 +186,9 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ ;fi +RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ + rm /etc/php/7.0/cli/conf.d/aerospike.ini \ +;fi # #-------------------------------------------------------------------------- From b254d4a9c9cc613e91ce60157074355b62d73cb5 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 11 Sep 2016 08:39:25 +0800 Subject: [PATCH 8/9] add mysql custom configuration file. Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 5 +---- mysql/Dockerfile | 6 +----- mysql/my.cnf | 6 ++++++ 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 mysql/my.cnf diff --git a/docker-compose.yml b/docker-compose.yml index 0303a811..9e68b633 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -101,10 +101,7 @@ services: ### MySQL Container ######################################### mysql: - build: - context: ./mysql - args: - - MAX_ALLOWED_PACKET=20M + build: ./mysql volumes_from: - volumes_data ports: diff --git a/mysql/Dockerfile b/mysql/Dockerfile index c5451ef9..51d7fb22 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -2,11 +2,7 @@ FROM mysql:latest MAINTAINER Mahmoud Zalt -ARG MAX_ALLOWED_PACKET=1M -ENV MAX_ALLOWED_PACKET ${MAX_ALLOWED_PACKET} - -# Set MAX_ALLOWED_PACKET to /etc/mysql/my.cnf -RUN sed -i "s/^\[mysqld\]$/\[mysqld\]\nmax_allowed_packet = ${MAX_ALLOWED_PACKET}/g" /etc/mysql/my.cnf +ADD my.cnf /etc/mysql/conf.d/my.cnf CMD ["mysqld"] diff --git a/mysql/my.cnf b/mysql/my.cnf new file mode 100644 index 00000000..e4c1ddbd --- /dev/null +++ b/mysql/my.cnf @@ -0,0 +1,6 @@ +# The MySQL Client configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +[mysql] From 16b6223ba9f6af169600bb3cfdf5ccc9b83344ed Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 13 Sep 2016 21:40:03 -0400 Subject: [PATCH 9/9] Fixes #305 --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9e68b633..e9170fb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -234,6 +234,7 @@ services: build: ./caddy volumes_from: - volumes_source + - volumes_data ports: - "80:80" - "443:443" @@ -307,6 +308,7 @@ services: - ./data/mongo:/data/db - ./data/aerospike:/opt/aerospike/data - ./data/sessions:/sessions + - ./data/caddy:/root/.caddy - ./data/elasticsearch/data:/usr/share/elasticsearch/data ### Add more Containers below ###############################