temberature / blog

http://temberature.github.io/blog
2 stars 5 forks source link

ambar #82

Open temberature opened 5 years ago

temberature commented 5 years ago

https://ambar.cloud/docs/installation-docker/

sudo su docker images docker login docker image tag ambar-pipeline tiandatong/ambar-pipeline:0.0.1 docker image push tiandatong/ambar-pipeline:0.0.1 docker image build -t ambar-frontend .

docker-compose down docker-compose up -d

docker-compose --compatibility up -d

temberature commented 5 years ago

$ sudo docker ps $ sudo docker exec -it 3181304a1e8c /bin/bash

temberature commented 5 years ago

http://34.80.76.76:8080/api/files/download?path=%2F%2Fui-upload%2F%E3%80%8A%E5%8F%A4%E4%BB%A3%E4%BA%BA%E7%9A%84%E8%87%AA%E7%94%B1%E4%B8%8E%E7%8E%B0%E4%BB%A3%E4%BA%BA%E7%9A%84%E8%87%AA%E7%94%B1%E3%80%8B.epub

temberature commented 5 years ago

http://34.80.76.76:8080/api/files/download?sha=116162e38bbefd4855663b6a46fc6b82149ec0301c358474c6eaf8e289cb9aca

temberature commented 5 years ago

npm run deploy:prod

temberature commented 4 years ago

ance-5:/home/tong# curl http://localhost:9200/_cat/indices yellow open ambar_log_record_data tIc4s9IMS8aoZNbwr8lcyw 10 1 728978 0 155.5mb 155.5mb yellow open ambar_file_data 2JHm7DmYRuqO36ecb77SaA 8 1 1109 256 2.3gb 2.3gb

temberature commented 4 years ago

{ "from": 0, "size": 25, "query": { "bool": { "must": [ { "range": { "content.size": { "lt": 50000000 } } }, { "term": { "content.state": "processed" } }, { "bool": { "should": [ { "simple_query_string": { "query": "\"中国\"", "fields": [ "content.text", "content.author.analyzed", "meta.source_id.analyzed", "meta.full_name.analyzed" ], "default_operator": "and" } } ], "minimum_should_match": 1 } }, { "bool": { "must_not": [ { "has_child": { "type": "ambar_file_hidden_mark", "query": { "match_all": {} } } } ] } } ], "should": [ { "has_child": { "type": "ambar_file_tag", "query": { "match_all": {} }, "inner_hits": { "from": 0, "size": 200, "highlight": { "fields": { "name": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50, "highlight_query": { "bool": { "should": [] } } } }, "require_field_match": true } } } }, { "has_child": { "type": "ambar_file_hidden_mark", "query": { "match_all": {} }, "inner_hits": { "from": 0, "size": 1 } } } ], "minimum_should_match": 0 } }, "highlight": { "order": "score", "fields": { "content.author": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50 }, "content.author.analyzed": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50 }, "meta.full_name": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50 }, "meta.source_id": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50 }, "meta.full_name.analyzed": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50 }, "meta.source_id.analyzed": { "pre_tags": [ "" ], "post_tags": [ "" ], "fragment_size": 500, "number_of_fragments": 50 }, "content.text": { "highlight_query": { "bool": { "should": [ { "simple_query_string": { "query": "\"中国\"", "fields": [ "content.text", "content.author.analyzed", "meta.source_id.analyzed", "meta.full_name.analyzed" ], "default_operator": "and" } } ], "minimum_should_match": 1 } }, "type": "fvh", "fragment_size": 500, "number_of_fragments": 50, "phrase_limit": 1024, "no_match_size": 500 } }, "require_field_match": true } }

temberature commented 4 years ago

"number_of_shards": "8", https://github.com/RD17/ambar/blob/ce987d0bb29212e594257d19127c8dc7c107e6e1/ServiceApi/src/services/EsProxy/AmbarFileDataMapping.json

temberature commented 4 years ago

windows 10 docker 资源分配会导致ES 起不来

temberature commented 4 years ago

docker-compose --verbose up

temberature commented 4 years ago

ERROR: Service 'frontend' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder162209278/dist: no such file or directory "deploy:prod": "better-npm-run deploy:prod" npm i npm run deploy:prod

temberature commented 4 years ago

Note that some of the components require compilation or other build steps be performed on the host before the docker images can be built. For example, FrontEnd:

# Assuming a suitable version of node.js is installed (docker uses 8.10)
$ npm install
$ npm run compile