Skip to content

Commit

Permalink
Add command to index file
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalNoisette committed Feb 6, 2021
1 parent 7805fd9 commit b8b45f8
Show file tree
Hide file tree
Showing 43 changed files with 7,136 additions and 440 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
node_modules
bower_components
package-lock.json
.nyc_output
coverage
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
node_modules
bower_components
package-lock.json
.nyc_output
coverage
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:14-slim
WORKDIR /usr/src/app
COPY . .
RUN npm install
ENTRYPOINT [ "npm", "run" , "start" ]
RUN npm install && npm run build:prod
ENTRYPOINT [ "npm", "run" , "start:prod" ]
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,30 @@ docker-compose up -d

## Initial installation (destructive)

Any index named "notes" will be dropped.
Any index named "notes" and "attachs" will be dropped with a "attachment" pipeline.
```
docker-compose exec elasticsearch bin/elasticsearch-plugin install --batch ingest-attachment
docker-compose restart elasticsearch
docker-compose run --rm indexer install
docker-compose run --rm indexer install-ingest
```
## Reindex cronjob

The first launch will index all note, and the followings will check the last known UpdatedTime in elasticsearch compared to the UpdatedTime of the last created or modified notes and send the one missing.
```
docker-compose run --rm indexer reindex
docker-compose run --rm indexer attach
```

## Options

| Environnement variable | Default | Description |
| ---------------------- |:------------------------------------:| ----------------------------:|
| SUPPORTED_FORMAT | 'pdf,doc,docx,xls,xlsx,epub,ods,odt' | Index only this content type |
| NODE_ENV | | Can be production, faster |
| BACKEND_PORT | 3000 | TCP port |
| STORAGE_PATH | '/leanote/data/' | Leanote storage directory |
| ES_HOST | 'https://admin:admin@127.0.0.1' | Index only this content type |
| MONGO_HOST | 'mongodb://127.0.0.1:27017/leanote' | Index only this content type |


Loading

0 comments on commit b8b45f8

Please sign in to comment.