Sign inSign up

demidovich/docker-sphinx

By demidovich

Updated over 7 years ago

Image
0

259

demidovich/docker-sphinx repository overview

docker-sphinx

Examples

docker-compose

version: '2'
services:
  sphinx:
    image: demidovich/docker-sphinx
    restart: always
    container_name: sphinx
    network_mode: host
    ports:
    - "127.0.0.1:19312:19312"
    - "127.0.0.1:19306:19306"
    volumes:
    - ./sphinx/conf/sphinx.conf:/opt/sphinx/conf/sphinx.conf
    - ./sphinx/data:/opt/sphinx/index
    mem_limit: 512m

Enable access rights for selinux

chcon -R -t svirt_sandbox_file_t ./sphinx
restorecon -R ./sphinx

sphinx.conf

indexer
{
    mem_limit = 256M
}

searchd
{
    listen           = localhost:19312
    listen           = localhost:19306:mysql41
    log              = /opt/sphinx/searchd.log
    query_log        = /opt/sphinx/query.log
    pid_file         = /opt/sphinx/searchd.pid
    read_timeout     = 5
    max_children     = 30
    seamless_rotate  = 1
    preopen_indexes  = 1
    unlink_old       = 1
    workers          = threads
    binlog_path      = /opt/sphinx/index
    sphinxql_timeout = 900
    rt_flush_period  = 3600
}

index ind_example
{
    type = rt
    path = /opt/sphinx/index/ind_example

    rt_field = title
    rt_attr_string = title

    expand_keywords = 0
    min_word_len    = 1
    min_prefix_len  = 1
    min_infix_len   = 2
}

Tag summary

Content type

Image

Digest

Size

39.2 MB

Last updated

over 7 years ago

docker pull demidovich/docker-sphinx