move image build in separate dockerfiles
This commit is contained in:
4
Dockerfile.entities-search-engine
Normal file
4
Dockerfile.entities-search-engine
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM node:6.11.1
|
||||
ENV USER=inventaire
|
||||
|
||||
CMD [ "node_modules/coffee-script/bin/coffee", "server/server.coffee"]
|
||||
15
Dockerfile.inventaire
Executable file
15
Dockerfile.inventaire
Executable file
@@ -0,0 +1,15 @@
|
||||
FROM node:6.11.1
|
||||
ENV USER=inventaire
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y upgrade \
|
||||
&& apt-get install -y curl \
|
||||
zsh \
|
||||
git \
|
||||
nginx \
|
||||
graphicsmagick \
|
||||
openssl \
|
||||
inotify-tools \
|
||||
&& apt-get clean
|
||||
|
||||
CMD ["npm", "start"]
|
||||
@@ -43,12 +43,18 @@ Check out [official doc](https://docs.docker.com/compose/)
|
||||
|
||||
## Load wikidata into elasticsearch
|
||||
|
||||
Make sure ES import limit is above entities-search-engige import rate, by raising the limit
|
||||
|
||||
```
|
||||
docker-compose exec entities-search-engine curl -XPUT http://elasticsearch:9200/wikidata/_settings -d '{"index.mapping.total_fields.limit": 2000}'
|
||||
```
|
||||
|
||||
start the containers `docker-compose up`
|
||||
|
||||
```
|
||||
claim=P31:Q5
|
||||
type=humans
|
||||
docker-compose exec entities-search-engine ./bin/dump_wikidata_subset claim type
|
||||
docker-compose exec entities-search-engine ./bin/dump_wikidata_subset $claim $type
|
||||
```
|
||||
|
||||
for more [info](https://github.com/inventaire/entities-search-engine/blob/master/docs/wikidata_filtered_dump_import.md)
|
||||
|
||||
@@ -8,17 +8,17 @@ services:
|
||||
COUCHDB_USER: "couchdb"
|
||||
COUCHDB_PASSWORD: "password"
|
||||
inventaire:
|
||||
image: node:6.11.1
|
||||
command: "npm start"
|
||||
build:
|
||||
context: ./.
|
||||
dockerfile: Dockerfile.inventaire
|
||||
ports:
|
||||
- "3006:3006"
|
||||
volumes:
|
||||
- ./inventaire:/opt/inventaire
|
||||
- ./utils/config/inventaire-local.coffee:/opt/inventaire/config/local.coffee
|
||||
links:
|
||||
- couch
|
||||
working_dir: /opt/inventaire
|
||||
depends_on:
|
||||
- couch
|
||||
- entities-search-engine
|
||||
elasticsearch:
|
||||
image: elasticsearch
|
||||
@@ -35,6 +35,7 @@ services:
|
||||
volumes:
|
||||
- ./entities-search-engine:/opt/entities-search-engine
|
||||
- ./utils/config/entities-search-engine-local.coffee:/opt/entities-search-engine/config/local.coffee
|
||||
- ./utils/elastic_setup.sh:/opt/entities-search-engine/
|
||||
links:
|
||||
- couch
|
||||
working_dir: /opt/entities-search-engine
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
module.exports =
|
||||
host: '0.0.0.0'
|
||||
elasticsearch:
|
||||
host: 'elasticsearch'
|
||||
port: '9200'
|
||||
host: 'http://elasticsearch:9200'
|
||||
db:
|
||||
protocol: 'http'
|
||||
# host defined in docker-compose couchdb image name
|
||||
|
||||
Reference in New Issue
Block a user