From 8ca26e6c06c5841c8ca2c328ea5a0220209a3d71 Mon Sep 17 00:00:00 2001 From: Adrian Nuta Date: Wed, 6 Mar 2019 14:50:00 +0200 Subject: [PATCH] Add Manticore Search (#2036) * Add Manticore Search --- .travis.yml | 2 +- docker-compose.yml | 15 +++++++++++++++ env-example | 7 +++++++ manticore/Dockerfile | 5 +++++ manticore/config/sphinx.conf | 25 +++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 manticore/Dockerfile create mode 100644 manticore/config/sphinx.conf diff --git a/.travis.yml b/.travis.yml index f93c8591..d4731771 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ env: - PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin" - PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy" - PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server" - - PHP_VERSION=NA BUILD_SERVICE="ipython-controller" + - PHP_VERSION=NA BUILD_SERVICE="ipython-controller manticore" # - PHP_VERSION=NA BUILD_SERVICE="aws" # Installing a newer Docker version diff --git a/docker-compose.yml b/docker-compose.yml index 91e088f6..8077019d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1400,3 +1400,18 @@ services: - "${COUCHDB_PORT}:5984" networks: - backend + +### Manticore Search ########################################### + manticore: + build: + context: ./manticore + volumes: + - ${MANTICORE_CONFIG_PATH}:/etc/sphinxsearch + - ${DATA_PATH_HOST}/manticore/data:/var/lib/manticore/data + - ${DATA_PATH_HOST}/manticore/log:/var/lib/manticore/log + ports: + - "${MANTICORE_API_PORT}:9312" + - "${MANTICORE_SPHINXQL_PORT}:9306" + - "${MANTICORE_HTTP_PORT}:9308" + networks: + - backend diff --git a/env-example b/env-example index 7054334a..c836386c 100644 --- a/env-example +++ b/env-example @@ -658,3 +658,10 @@ MOSQUITTO_PORT=9001 ### COUCHDB ################################################### COUCHDB_PORT=5984 + +### Manticore Search ########################################## + +MANTICORE_CONFIG_PATH=./manticore/config +MANTICORE_API_PORT=9312 +MANTICORE_SPHINXQL_PORT=9306 +MANTICORE_HTTP_PORT=9308 diff --git a/manticore/Dockerfile b/manticore/Dockerfile new file mode 100644 index 00000000..2b78830a --- /dev/null +++ b/manticore/Dockerfile @@ -0,0 +1,5 @@ +FROM manticoresearch/manticore + +EXPOSE 9306 +EXPOSE 9308 +EXPOSE 9312 diff --git a/manticore/config/sphinx.conf b/manticore/config/sphinx.conf new file mode 100644 index 00000000..0a992b97 --- /dev/null +++ b/manticore/config/sphinx.conf @@ -0,0 +1,25 @@ +index testrt { + type = rt + rt_mem_limit = 128M + path = /var/lib/manticore/data/testrt + rt_field = title + rt_field = content + rt_attr_uint = gid +} + +searchd { + listen = 9312 + listen = 9308:http + listen = 9306:mysql41 + log = /var/lib/manticore/log/searchd.log + # you can also send query_log to /dev/stdout to be shown in docker logs + query_log = /var/lib/manticore/log/query.log + read_timeout = 5 + max_children = 30 + pid_file = /var/run/searchd.pid + seamless_rotate = 1 + preopen_indexes = 1 + unlink_old = 1 + binlog_path = /var/lib/manticore/data +} +