From 343a950adc5654e7acbd5e2291830c7f39ad5937 Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Mon, 26 Dec 2016 01:59:58 -0200 Subject: [PATCH 1/3] add rethink-db container --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- rethinkdb/Dockerfile | 11 +++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 rethinkdb/Dockerfile diff --git a/README.md b/README.md index 7ebe60ca..58f591fa 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - MariaDB - MongoDB - Neo4j + - RethinkDB - **Cache Engines:** - Redis - Memcached @@ -139,7 +140,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - Beanstalkd (+ Beanstalkd Console) - RabbitMQ (+ RabbitMQ Console) - **Tools:** - - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, xDebug, Vim...) + - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, xDebug, Envoy, Vim...) - PhpMyAdmin - PgAdmin - ElasticSearch @@ -1356,6 +1357,44 @@ It should be like this: ####[Laravel Envoy Documentation Here](https://laravel.com/docs/5.3/envoy) +
+ +### Use RethinkDB Container + +The RethinkDB is an open-source Database for Real-time Web ([RethinkDB](https://rethinkdb.com/)). +A package ([Laravel RethinkDB](https://github.com/duxet/laravel-rethinkdb)) is being developed and was released a version for Laravel 5.2 (experimental). + +1 - Run the RethinkDB Container (`rethinkdb`) with the `docker-compose up` command. + +```bash +docker-compose up -d rethinkdb +``` + +2 - Add the RethinkDB configurations to the `config/database.php` configuration file: + +```php +'connections' => [ + + 'rethinkdb' => [ + 'name' => 'rethinkdb', + 'driver' => 'rethinkdb', + 'host' => env('DB_HOST', 'rethinkdb'), + 'port' => env('DB_PORT', 28015), + 'database' => env('DB_DATABASE', 'test'), + ] + + // ... + +], +``` + +3 - Open your Laravel's `.env` file and update the following variables: + +- set the `DB_CONNECTION` to your `rethinkdb`. +- set the `DB_HOST` to `rethinkdb`. +- set the `DB_PORT` to `28015`. +- set the `DB_DATABASE` to `database`. +
@@ -1504,6 +1543,7 @@ For special help with Docker and/or Laravel, you can schedule a live call with t - [Matthew Tonkin Dunn](https://github.com/mattythebatty) (mattythebatty) - [Zhivitsa Kirill](https://github.com/zhikiri) (zhikiri) - [Benmag](https://github.com/benmag) +- [Cristian Mello](https://github.com/cristiancmello) (cristiancmello) **Other Contributors & Supporters:** diff --git a/rethinkdb/Dockerfile b/rethinkdb/Dockerfile new file mode 100644 index 00000000..f5cb295a --- /dev/null +++ b/rethinkdb/Dockerfile @@ -0,0 +1,11 @@ +FROM rethinkdb:latest + +MAINTAINER Cristian Mello + +VOLUME /data/rethinkdb_data + +RUN cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf + +CMD ["rethinkdb", "--bind", "all"] + +EXPOSE 8080 From f0eda439064a08cd7f2e23c36a25e9e292c4320a Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Mon, 26 Dec 2016 02:12:11 -0200 Subject: [PATCH 2/3] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58f591fa..0bbf9680 100644 --- a/README.md +++ b/README.md @@ -1370,7 +1370,9 @@ A package ([Laravel RethinkDB](https://github.com/duxet/laravel-rethinkdb)) is b docker-compose up -d rethinkdb ``` -2 - Add the RethinkDB configurations to the `config/database.php` configuration file: +2 - Access the RethinkDB Administration Console [http://localhost:8090/#tables](http://localhost:8090/#tables) for create a database called `database`. + +3 - Add the RethinkDB configurations to the `config/database.php` configuration file: ```php 'connections' => [ @@ -1388,7 +1390,7 @@ docker-compose up -d rethinkdb ], ``` -3 - Open your Laravel's `.env` file and update the following variables: +4 - Open your Laravel's `.env` file and update the following variables: - set the `DB_CONNECTION` to your `rethinkdb`. - set the `DB_HOST` to `rethinkdb`. From 1ce802f2cc34c379b318fdcac6ef2ae13d92aab6 Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Mon, 26 Dec 2016 12:38:50 -0200 Subject: [PATCH 3/3] Update docker-compose.yml --- docker-compose.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3f70e599..eec861e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -190,6 +190,15 @@ services: - "27017:27017" volumes: - mongo:/data/db + +### RethinkDB Container ####################################### + + rethinkdb: + build: ./rethinkdb + ports: + - "8090:8080" + volumes: + - rethinkdb:/data/rethinkdb_data ### Redis Container ######################################### @@ -332,6 +341,8 @@ volumes: driver: "local" mongo: driver: "local" + rethinkdb: + driver: "local" phpmyadmin: driver: "local" aerospike: