E.E.A.N. stack running on docker containers orchestrated by docker-compose
The E.E.A.N. stack is made of :
Front-end using :
The following software must be available on the host running the application (linux, Windows, iOS) :
- docker
- docker-compose
Tested with docker 1.9.1 and docker-compose 1.5.2
Ports 8089 9200 9300 must be available on the host.
$ git clone https://github.com/oguennec/angular-elastic-runner
$ cd angular-elastic-runner
$ docker-compose build
$ docker-compose up -d
$ cd es/data ; curl -XPOST localhost:9200/_bulk --data-binary @"openrecipes.2000rows.json"
openrecipes.2000rows.json contains 2000 recipes from the OpenRecipes project.
$ curl -XPOST localhost:9200/openrecipes/query/1/_create -d '{"label": "dummy doc to create type"}'
$ curl -XDELETE localhost:9200/openrecipes/query/1
List docker containers running : angularelasticrunner_es_1 (ElasticSeach) and angularelasticrunner_web_1 (EEAN Stack)
$ docker ps
- You can develop on the docker host
$ cd web/src/public
The above directory is mounted inside the web container.
Any change in this directory (from docker host) is available inside the running container.
No need to enter inside the docker container to modify the web application.
-
The non-source tree dependencies (nodeJS or bower) are downloaded from inside the web container and not available on the docker host.
-
To update these server or client dependencies:
- modify package.json or bower.json on the docker host
- copy the modified file(s) into the running container
- run bower install (or update) inside the running container through a gulp task
$ docker cp bower.json angularelasticrunnerdev_web_1:/src/bower.json
$ docker exec angularelasticrunner_web_1 npm run gulp bower-install
- Build a new web image and replace the running web container:
$ docker-compose build web
$ docker-compose up -d web
- Test javascript with Jasmine in Phantomjs by starting Karma like this
$ docker exec angularelasticrunner_web_1 karma start
- Marvel plugin is a web interface to ElasticSearch
- http://localhost:9200/_plugin/marvel/sense/index.html
- Plugin to activate in Elastic container (see es/Dockerfile)
This project is licensed under the terms of the MIT license.