Skip to content

Anteplim/docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Manticore Search Docker image

This is the official repository of the Docker image for Manticore Search.

Manticore Search is an open source full-text search server. The image use Alpine as operating system.

The searchd daemon runs in nodetach mode. Default configuration includes includes a simple Real-Time index and listen on the default ports ( 9306 for SphinxQL and 9312 for SphinxAPI).

The image comes with MySQL and PostgreSQL client libraries for indexing data from these databases as well as expat library for indexing data from XML files.

How to run this image

Quick usage

  docker run --name manticore -p 9306:9306 -d manticoresearch/manticore

In another console:

$ mysql -h0 -P9306
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 2.6.1 e049fec@180113 release 

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW TABLES;
+--------+------+
| Index  | Type |
+--------+------+
| testrt | rt   |
+--------+------+
1 row in set (0,00 sec)

mysql> INSERT INTO testrt(id,title,content,gid) VALUES(1,'Hello','World',10);
Query OK, 1 row affected (0.00 sec)

mysql> SELECT * FROM testrt;
+------+------+
| id   | gid  |
+------+------+
|    1 |   10 |
+------+------+
1 row in set (0,00 sec)

To shutdown the daemon:

  docker stop manticore

Mounting points

The configuration folder inside the image is the usual /etc/sphinxseach. Index files are located at /var/lib/manticore/data and logs at /var/lib/manticore/log. For persistence, mount these points to your local folders.

docker run --name manticore -v ~/manticore/etc/:/etc/sphinxsearch/ -v ~/manticore/data/:/var/lib/manticore/data -v ~/manticore/logs/:/var/lib/manticore/log -p 9306:9306 -d manticoresearch/manticore

In ~/manticore/ you need to create the etc/,data/ and logs/ folders, as well as add a valid sphinx.conf in ~/manticore/etc/.

Rotating indexes

docker exec -it manticore indexer --all --rotate

Default configuration

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          = 9306:mysql41
    log             = /var/lib/manticore/log/searchd.log
    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
    workers         = threads # 
    binlog_path     = /var/lib/manticore/data
}

Logging

searchd runs with --no-detach option, sending it's log to /dev/stdout, which can be seen with

  docker logs manticore

You can also send the query logs to /dev/stdout to be viewed using docker logs. Alternative, you can monitor the query log directly by doing

  docker exec -it manticore tail -f /var/lib/manticore/log/query.log

Issues

For reporting issues, please use the issue tracker.

About

Docker cointainer for Manticore Search

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 61.1%
  • Shell 38.9%