remove entities-search-engine
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,3 @@
|
|||||||
inventaire
|
inventaire
|
||||||
entities-search-engine
|
|
||||||
data
|
data
|
||||||
log
|
log
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
FROM node:8-alpine
|
|
||||||
|
|
||||||
RUN apk add --no-cache curl
|
|
||||||
|
|
||||||
CMD [ "node_modules/coffee-script/bin/coffee", "server/server.coffee"]
|
|
||||||
|
|
||||||
31
README.md
31
README.md
@@ -14,14 +14,10 @@ git clone https://github.com/inventaire/inventaire-docker.git
|
|||||||
|
|
||||||
got to `cd inventaire-docker`
|
got to `cd inventaire-docker`
|
||||||
|
|
||||||
clone the two repos inventaire needs to run :
|
clone `inventaire` core application server -> [setup](https://github.com/inventaire/inventaire#installation)
|
||||||
|
|
||||||
- `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)
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/inventaire/inventaire.git
|
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
|
docker-compose build
|
||||||
```
|
```
|
||||||
|
|
||||||
Then download de Node dependencies, thanks to the magnificient `npm`:
|
Download Node dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose run --rm inventaire npm install
|
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:
|
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
|
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
|
## Fixtures
|
||||||
|
|
||||||
In case you would like to play with out-of-the-box data.
|
In case you would like to play with out-of-the-box data.
|
||||||
@@ -176,7 +151,7 @@ Alternatively, as root in inventaire container:
|
|||||||
|
|
||||||
### Elastic `users` and `groups` indexes are not up to date
|
### 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
|
```bash
|
||||||
docker-compose exec inventaire npm run couch2elastic4sync:init
|
docker-compose exec inventaire npm run couch2elastic4sync:init
|
||||||
|
|||||||
@@ -11,7 +11,3 @@ services:
|
|||||||
ports: [ "3009:3009" ]
|
ports: [ "3009:3009" ]
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: "tests-api"
|
NODE_ENV: "tests-api"
|
||||||
entities-search-engine:
|
|
||||||
ports: [ "3214:3214" ]
|
|
||||||
environment:
|
|
||||||
NODE_ENV: "tests"
|
|
||||||
|
|||||||
@@ -35,17 +35,3 @@ services:
|
|||||||
network_mode: host
|
network_mode: host
|
||||||
logging:
|
logging:
|
||||||
driver: none
|
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
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user