"Aide was the Basque numenistic deity of the air. She could manifest herself in both good (gentle breeze) and evil (storm wind) forms." wikipedia.org
This application is a frontend for EEA Searchservices. It provides a slice and dice facetted search for Air emissions statistics reported to the European Environment Agency on behalf of the European Commission.
Node.js application + Docker env
- Change code
- If you:
- Want to change something in eea.searchserver.js:
./build_dev.sh $PATH_TO_EEA_SEARCHSERVER_JS_REPO
- If you changed
Dockerfile
orapp/package.json
:docker build -t eeacms/aide:dev .
and also make the changes in Dockerfile.dev. - If you changed only something in './app' : go to step 3.
- If step 3 is still running and last build was made with
./build_dev.sh
: go to step 4 because the server will automatically restart inside the container - Note:
Dockerfile.dev
builds only with./build_dev.sh
because it temporarely adds eea.searchserver.js in the current directory. docker-compose up
- Go to http://localhost:3000
If you want to check that the image is built correctly, please comment out
the volumes
entry in docker-compose.yml
cd app
npm install
- Set
elastic_*
env variables ./app.js runserver
- Go to http://localhost:3000
docker pull eeacms/aide
- Use any orchestration solution and make sure that the container can ping the Elastic backend
- Pass commands and env variables to the image as explained in the Docker Usage section
If the application is mapped under a path like: /data-and-maps/aide it needs to be redirected to /data-and-maps/aide/
```
RewriteCond %{REQUEST_URI} data-and-maps/aide$
RewriteRule ^(.*[^/])$ $1/ [L,R=301]
```
- nginx:
location /data-and-maps/aide/ { proxy_pass http://hostRunningAIDEContainer:3000/ }
Basic usage of the image is given by the following pattern:
docker run -e elastic_host=$YOUR_ELASTIC_HOST run eeacms/aide $command
To see the available commands run:
docker run -e elastic_host=$YOUR_ELASTIC_HOST run eeacms/aide help
Available commands:
- create_index: create the index on elastic_host and start harvesting
- reindex : recrate the index on the elastic_host and start harvesting
- remove_data: remove the ES index of this app
- remove_river: stop the harvesting process by removing the river
Environment variables:
- elastic_host, elastic_port, elastic_path: the elasticsearch endpoint parameters
the elasticsearch endpoint will be interpreted as such:
http://$elastic_host:$elastic_port$elastic_path
- by default, elastic_port is 9200
- by default, elastic_path is /
- NODE_ENV: can be either
dev
orproduction
dev
will do a more verbose loggingproduction
will log only erros in an APACHE format- Assuming that the app will be proxied in production, the proxy app should contain the access logs
Note that any index creation commands require rights on the set elastic_backend
For more information about the settings.yml file, please see https://github.com/eea/eea.searchserver.js/blob/master/README.md