diff --git a/README-zh.md b/README-zh.md index 4691e12..7ac5061 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` 命令中加上它们. diff --git a/README.md b/README.md index 29c9e50..38a6c9e 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` + +
diff --git a/docker-compose.yml b/docker-compose.yml index 948e576..e9170fb 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" @@ -272,6 +273,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 +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 ############################### diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile new file mode 100644 index 0000000..363932e --- /dev/null +++ b/elasticsearch/Dockerfile @@ -0,0 +1,5 @@ +FROM elasticsearch:latest + +MAINTAINER Bo-Yi Wu + +EXPOSE 9200 9300 diff --git a/mysql/Dockerfile b/mysql/Dockerfile index ae60244..51d7fb2 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -2,6 +2,8 @@ FROM mysql:latest MAINTAINER Mahmoud Zalt +ADD my.cnf /etc/mysql/conf.d/my.cnf + CMD ["mysqld"] EXPOSE 3306 diff --git a/mysql/my.cnf b/mysql/my.cnf new file mode 100644 index 0000000..e4c1ddb --- /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] diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index ea390a1..3b7dd45 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: ##################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 96bc387..9e9baad 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 @@ -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 # #--------------------------------------------------------------------------