From f486a31154d95e814f86227fd70bc8822463648c Mon Sep 17 00:00:00 2001 From: jums Date: Sat, 28 Nov 2020 16:27:52 +0100 Subject: [PATCH] remove entities-search-engine --- .gitignore | 1 - Dockerfile.entities-search-engine | 6 ------ README.md | 33 ++++--------------------------- docker-compose.test.yml | 4 ---- docker-compose.yml | 14 ------------- 5 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 Dockerfile.entities-search-engine diff --git a/.gitignore b/.gitignore index 8a38a2f..8b2d3cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ inventaire -entities-search-engine data log \ No newline at end of file diff --git a/Dockerfile.entities-search-engine b/Dockerfile.entities-search-engine deleted file mode 100644 index 38977c2..0000000 --- a/Dockerfile.entities-search-engine +++ /dev/null @@ -1,6 +0,0 @@ -FROM node:8-alpine - -RUN apk add --no-cache curl - -CMD [ "node_modules/coffee-script/bin/coffee", "server/server.coffee"] - diff --git a/README.md b/README.md index 7ba88d6..5372214 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,10 @@ git clone https://github.com/inventaire/inventaire-docker.git got to `cd inventaire-docker` -clone the two repos inventaire needs to run : - - - `inventaire` core application server -> [setup](https://github.com/inventaire/inventaire#installation) - - `entities-search-engine` for querying entities -> [go to repo](https://github.com/inventaire/entities-search-engine) +clone `inventaire` core application server -> [setup](https://github.com/inventaire/inventaire#installation) ```bash git clone https://github.com/inventaire/inventaire.git -git clone https://github.com/inventaire/entities-search-engine.git ``` @@ -37,11 +33,10 @@ Start the magic, build everything ! docker-compose build ``` -Then download de Node dependencies, thanks to the magnificient `npm`: +Download Node dependencies: ```bash docker-compose run --rm inventaire npm install -docker-compose run --rm entities-search-engine npm install ``` Configure inventaire so that it can connect to CouchDB: @@ -111,26 +106,6 @@ curl -H 'Content-Type:application/json' -H 'Accept: application/json' -XPUT http curl -XPOST http://localhost:9200/wikidata/_open ``` -Index all wd items with statement `wdt:P31 wd:Q5` aka all humans : - -```bash -docker-compose exec entities-search-engine ./bin/dump_wikidata_subset P31:Q5 humans -``` - -[More info on importing some wikidata items](https://github.com/inventaire/inventaire-deploy/install_entities_search_engine) - -More docs [wikidata filtered dump import](https://github.com/inventaire/entities-search-engine/blob/master/docs/wikidata_filtered_dump_import.mdFv) - -## Enable inventaire items to be searchable - -To index inventaire items created locally, enable updater in `inventaire/config/locale.js`: - -```js -entitiesSearchEngine: { - updateEnabled: true -} -``` - ## Fixtures In case you would like to play with out-of-the-box data. @@ -167,7 +142,7 @@ Tip : create a symbolic link on your machine between the inventaire folder and d `sudo ln ~/path/to/inventaire-docker/inventaire /opt -s` -Alternatively, as root in inventaire container: +Alternatively, as root in inventaire container: `# mkdir /supervisor/path/to/inventaire` `# ln -s /opt/ /supervisor/path/to/inventaire` @@ -176,7 +151,7 @@ Alternatively, as root in inventaire container: ### Elastic `users` and `groups` indexes are not up to date -`couchdb2elastic4sync` is a small libary in charge of maintaining ES indexes up to date with couchdb documents (only for `users` and `groups` since `entities` are handdled by `entities-search-engine`). If `couchdb2elastic4sync` does not find Elasticsearch search. Make sure configs files exists in `inventaire/scripts/couch2elastic4sync/configs`. They should be created during postinstall, but if the folder is empty, run the following scripts to create it : +`couchdb2elastic4sync` is a small libary in charge of maintaining ES indexes up to date with couchdb documents. If `couchdb2elastic4sync` does not find Elasticsearch search. Make sure configs files exists in `inventaire/scripts/couch2elastic4sync/configs`. They should be created during postinstall, but if the folder is empty, run the following scripts to create it : ```bash docker-compose exec inventaire npm run couch2elastic4sync:init diff --git a/docker-compose.test.yml b/docker-compose.test.yml index a03406d..f297117 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -11,7 +11,3 @@ services: ports: [ "3009:3009" ] environment: NODE_ENV: "tests-api" - entities-search-engine: - ports: [ "3214:3214" ] - environment: - NODE_ENV: "tests" diff --git a/docker-compose.yml b/docker-compose.yml index a882ccf..a3e53f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,17 +35,3 @@ services: network_mode: host logging: driver: none - entities-search-engine: - build: - context: ./. - dockerfile: Dockerfile.entities-search-engine - command: 'node server/server.js' - ports: - - "3213:3213" - volumes: - - ./entities-search-engine:/opt/entities-search-engine - working_dir: /opt/entities-search-engine - network_mode: host - logging: - driver: none -