Merge pull request #294 from appleboy/patch-11

Support ElasticSearch Container
This commit is contained in:
Mahmoud Zalt 2016-09-07 09:42:09 -04:00 committed by GitHub
commit a31cef6eb1
3 changed files with 34 additions and 1 deletions

View File

@ -50,6 +50,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
- [Use Mongo](#Use-Mongo) - [Use Mongo](#Use-Mongo)
- [Use phpMyAdmin](#Use-phpMyAdmin) - [Use phpMyAdmin](#Use-phpMyAdmin)
- [Use pgAdmin](#Use-pgAdmin) - [Use pgAdmin](#Use-pgAdmin)
- [Use ElasticSearch](#Use-ElasticSearch)
- [PHP](#PHP) - [PHP](#PHP)
- [Install PHP Extensions](#Install-PHP-Extensions) - [Install PHP Extensions](#Install-PHP-Extensions)
- [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version) - [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...) - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...)
- phpMyAdmin - phpMyAdmin
- pgAdmin - pgAdmin
- ElasticSearch
>If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :) >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: 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. **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` 2 - Open your browser and visit the localhost on port **5050**: `http://localhost:5050`
<br>
<a name="Use-ElasticSearch"></a>
### 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`
<br> <br>
<a name="PHP"></a> <a name="PHP"></a>

View File

@ -272,6 +272,18 @@ services:
links: links:
- postgres - postgres
### ElasticSearch Container ##################################
elasticsearch:
build: ./elasticsearch
volumes_from:
- volumes_data
ports:
- "9200:9200"
- "9300:9300"
links:
- php-fpm
### Laravel Application Code Container ###################### ### Laravel Application Code Container ######################
volumes_source: volumes_source:
@ -295,5 +307,6 @@ services:
- ./data/mongo:/data/db - ./data/mongo:/data/db
- ./data/aerospike:/opt/aerospike/data - ./data/aerospike:/opt/aerospike/data
- ./data/sessions:/sessions - ./data/sessions:/sessions
- ./data/elasticsearch/data:/usr/share/elasticsearch/data
### Add more Containers below ############################### ### Add more Containers below ###############################

5
elasticsearch/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM elasticsearch:latest
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
EXPOSE 9200 9300