Skip to content

Commit 8bb69be

Browse files
committed
t fetch Merge branch 'master' of https://github.com/LaraDock/laradock
* 'master' of https://github.com/LaraDock/laradock: Fixes laradock#305 add mysql custom configuration file. fix php warning "Unable to load dynamic library '/usr/lib/php/20151012/aerospike.so'" when aerospike set not install at workspace add build options MAX_ALLOWED_PACKET to mysql update readme for ElasticSearch. Support ElasticSearch Container. Add vue-cli on workspace npm global installers modify words in Chinese Add aerospike extension installation on phpfpm-56 as well
2 parents 1345164 + 76afeed commit 8bb69be

8 files changed

Lines changed: 71 additions & 3 deletions

File tree

README-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ docker-compose up -d nginx mysql
219219
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`.
220220

221221

222-
**说明**: `workspace``php-fpm` 将运行在大部分实例中, 所有不用在命令中 `up`加上它们.
222+
**说明**: `workspace``php-fpm` 将运行在大部分实例中, 所以不需要在 `up` 命令中加上它们.
223223

224224

225225

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
5050
- [Use Mongo](#Use-Mongo)
5151
- [Use phpMyAdmin](#Use-phpMyAdmin)
5252
- [Use pgAdmin](#Use-pgAdmin)
53+
- [Use ElasticSearch](#Use-ElasticSearch)
5354
- [PHP](#PHP)
5455
- [Install PHP Extensions](#Install-PHP-Extensions)
5556
- [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
136137
- Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...)
137138
- phpMyAdmin
138139
- pgAdmin
140+
- ElasticSearch
139141

140142

141143
>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
253255

254256
You can select your own combination of Containers form the list below:
255257

256-
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`.
258+
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`, `elasticsearch`.
257259

258260

259261
**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
741743
2 - Open your browser and visit the localhost on port **5050**: `http://localhost:5050`
742744

743745

746+
<br>
747+
<a name="Use-ElasticSearch"></a>
748+
### Use ElasticSearch
749+
750+
1 - Run the ElasticSearch Container (`elasticsearch`) with the `docker-compose up` command. Example:
751+
752+
```bash
753+
docker-compose up -d elasticsearch
754+
```
755+
756+
2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200`
757+
758+
744759
<br>
745760
<a name="PHP"></a>
746761

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ services:
234234
build: ./caddy
235235
volumes_from:
236236
- volumes_source
237+
- volumes_data
237238
ports:
238239
- "80:80"
239240
- "443:443"
@@ -272,6 +273,18 @@ services:
272273
links:
273274
- postgres
274275

276+
### ElasticSearch Container ##################################
277+
278+
elasticsearch:
279+
build: ./elasticsearch
280+
volumes_from:
281+
- volumes_data
282+
ports:
283+
- "9200:9200"
284+
- "9300:9300"
285+
links:
286+
- php-fpm
287+
275288
### Laravel Application Code Container ######################
276289

277290
volumes_source:
@@ -295,5 +308,7 @@ services:
295308
- ./data/mongo:/data/db
296309
- ./data/aerospike:/opt/aerospike/data
297310
- ./data/sessions:/sessions
311+
- ./data/caddy:/root/.caddy
312+
- ./data/elasticsearch/data:/usr/share/elasticsearch/data
298313

299314
### Add more Containers below ###############################

elasticsearch/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM elasticsearch:latest
2+
3+
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
4+
5+
EXPOSE 9200 9300

mysql/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM mysql:latest
22

33
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
44

5+
ADD my.cnf /etc/mysql/conf.d/my.cnf
6+
57
CMD ["mysqld"]
68

79
EXPOSE 3306

mysql/my.cnf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# The MySQL Client configuration file.
2+
#
3+
# For explanations see
4+
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
5+
6+
[mysql]

php-fpm/Dockerfile-56

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,28 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
8383
docker-php-ext-enable memcached \
8484
;fi
8585

86+
#####################################
87+
# PHP Aerospike:
88+
#####################################
89+
90+
ARG INSTALL_AEROSPIKE_EXTENSION=true
91+
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
92+
# Copy aerospike configration for remote debugging
93+
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
94+
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
95+
# Install the php aerospike extension
96+
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
97+
&& mkdir -p aerospike-client-php \
98+
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
99+
&& ( \
100+
cd aerospike-client-php/src/aerospike \
101+
&& phpize \
102+
&& ./build.sh \
103+
&& make install \
104+
) \
105+
&& rm /tmp/aerospike-client-php.tar.gz \
106+
;fi
107+
86108
#####################################
87109
# Opcache:
88110
#####################################

workspace/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
154154
nvm install ${NODE_VERSION} && \
155155
nvm use ${NODE_VERSION} && \
156156
nvm alias ${NODE_VERSION} && \
157-
npm install -g gulp bower \
157+
npm install -g gulp bower vue-cli \
158158
;fi
159159

160160
# Wouldn't execute when added to the RUN statement in the above block
@@ -186,6 +186,9 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
186186
) \
187187
&& rm /tmp/aerospike-client-php.tar.gz \
188188
;fi
189+
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
190+
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
191+
;fi
189192

190193
#
191194
#--------------------------------------------------------------------------

0 commit comments

Comments
 (0)