Sign inSign up

jc21/sphinxsearch

By jc21

Updated over 3 years ago

Docker container for Sphinx Search

Image
0

10K+

jc21/sphinxsearch repository overview

Sphinx Stars Pulls

Sphinx Search running on Centos 7

Due to the way Sphinx operates, you need to follow these steps:

  • Define your Sphinx Configuration - sphinx.conf
  • Get Sphinx to build the Indexes
  • Run the Server
  • Rotate the Indexes periodically

Docker Compose Example

version: "2"
services:
  sphinx:
    image: jc21/sphinxsearch
    ports:
      - 9306:9306
      - 9312:9312
    volumes:
      - "./sphinx.conf:/etc/sphinx/sphinx.conf"
      - "./data:/var/data/sphinx"

Creating the Indexes

With docker-compose:

docker-compose run --rm sphinx indexer --all

With docker vanilla:

docker run --rm -it \
    -v /path/to/sphinx.conf:/etc/sphinx/sphinx.conf \
    -v /path/to/data:/var/data/sphinx \
    jc21/sphinxsearch \
    indexer --all

Running the Sphinx Search Server

With docker-compose:

docker-compose up -d

With docker vanilla:

docker run --detach \
    --name sphinxsearch \
    -p 9306:9306 \
    -p 9312:9312 \
    -v /path/to/sphinx.conf:/etc/sphinx/sphinx.conf \
    -v /path/to/data:/var/data/sphinx \
    jc21/sphinxsearch

Rotating the Indexes

The docker container must be running for rotating to work.

With docker-compose:

docker-compose exec sphinx indexer --all --rotate 

With docker vanilla (assuming your container name is "sphinxsearch"):

docker exec -it sphinxsearch indexer --all --rotate

Tag summary

Content type

Image

Digest

Size

144.2 MB

Last updated

almost 5 years ago

docker pull jc21/sphinxsearch