Skip to content

oguennec/angular-elastic-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BuildStatus

Demo application : Search Open Recipes

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 :

Pre-requisite to install and run this application :

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.

Installation

$ git clone https://github.com/oguennec/angular-elastic-runner
$ cd angular-elastic-runner 
$ docker-compose build
$ docker-compose up -d

Load data in ElasticSearch

$ cd es/data ; curl -XPOST localhost:9200/_bulk --data-binary @"openrecipes.2000rows.json"

openrecipes.2000rows.json contains 2000 recipes from the OpenRecipes project.

Create a mapping type named query in ElasticSearch to store queries

$ curl -XPOST localhost:9200/openrecipes/query/1/_create -d '{"label": "dummy doc to create type"}'                 
$ curl -XDELETE localhost:9200/openrecipes/query/1   

Browse Search Open Recipes

http://localhost:8089

List docker containers running : angularelasticrunner_es_1 (ElasticSeach) and angularelasticrunner_web_1 (EEAN Stack)

$ docker ps

Development tips

  • 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

This project is licensed under the terms of the MIT license.

About

Demo application : Search Open Recipes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published