Skip to content

Commit d71476c

Browse files
committed
Update README for generating app with template
Related: #938
1 parent 82d799e commit d71476c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,20 @@ Article.import
8686
```
8787

8888
You can generate a simple Ruby on Rails application with a single command
89-
(see the [other available templates](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails#rails-application-templates)):
89+
(see the [other available templates](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails#rails-application-templates)). You'll need to have an Elasticsearch cluster running on your system before generating the app. The easiest way of getting this set up is by running it with Docker with this command:
90+
91+
```bash
92+
docker run \
93+
--name elasticsearch-rails-searchapp \
94+
--publish 9200:9200 \
95+
--env "discovery.type=single-node" \
96+
--env "cluster.name=elasticsearch-rails" \
97+
--env "cluster.routing.allocation.disk.threshold_enabled=false" \
98+
--rm \
99+
docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.0
100+
```
101+
102+
Once Elasticsearch is running, you can generate the simple app with this command:
90103

91104
```bash
92105
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb

elasticsearch-rails/lib/rails/templates/01-basic.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
--env "cluster.name=elasticsearch-rails" \
5555
--env "cluster.routing.allocation.disk.threshold_enabled=false" \
5656
--rm \
57-
docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.0
57+
docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.0
5858
CMD
5959

6060
begin

0 commit comments

Comments
 (0)