This application is just a simple demo what can be used as a basis for new applications.
It provides the basic indexing commands indexing, listing and detail pages, csv/tsv export.
It can be cloned, and with minimal configuration a new search application created from it.
Basic usage of the image is given by the following pattern:
docker run -d -v /path/of/your/config/:/code/config:z -p 8080:3000 -e "elastic_host=<elasticsearch_host_or_ip>" eeacms/esbootstrap:v1.0
<elasticsearch_host_or_ip>is the url or the ip of your elastic search server without the port./configis the folder that contains the configuration files for your app. Read this to know how to configure.
Read this to know how to setup.
For creating a new application you have to follow the next steps:
$ git clone --recursive https://github.com/eea/eea.docker.searchservices.git
$ cd eea.docker.searchservices
$ # clone eea.docker.esbootstrap under eea.docker.searchservices and gives new name: eea.docker.newesapp
$ git clone https://github.com/eea/eea.docker.esbootstrap.git eea.docker.newesapp
The config folder contains the configuration files for your app. Read this to know how to configure the files for your app.
Clone the docker-compose.dev.yml.example file under the name docker-compose.dev.yml and add to it the settings for development
newesapp:
image: eeacms/esbootstrap:dev # Work with dev build
links:
- esclient
ports:
- 3030:3000 # Take up an empty port number
environment:
- elastic_host=esclient
- AUTO_INDEXING=true #index data when the app is started for the first time
# - SYNC_CRONTAB=*/30 * * * * # This is optional, it executes the sync with a cronjob every 30 minutes
# - GOOGLE_MAP_KEY=google-map-api-key # To enable google map extention functionality in geo facet assign a valid key generated at https://developers.google.com/maps/documentation/javascript/get-api-key
volumes:
- ./eea.docker.newesapp/app/:/code/:z # the volumes are added for easier development
- ./eea.searchserver.js/lib/:/node_modules/eea-searchserver/lib/:z
In eea.docker.searchservices: At first try you have to build all development images for the applications
./build_dev.sh -s
Later, when you modify your application, is enough to rebuild only that. This is not mandatory, as in the docker-compose.dev.yml we already mounted the code in the container, but when you want to try to build the image, is enough to do:
./build_dev.sh newesapp -s
In eea.docker.searchservices start the whole stack with:
docker-compose -f docker-compose.dev.yml up
In your favorite browser go to:
http://<machine ip>:<port>
After there is a first working version of the application, you should
- add it in the stack as a git submodule for eea.docker.searchservices
- create a git tag for eea.docker.newesapp
- add the application in https://hub.docker.com and enable automatic build on tags
- add your application in docker-compose.yml from eea.docker.searchservices and pin it to the tag you added
For details on implementation read the documentation.