https://github.com/jc21/docker-sphinxsearch
Docker container for Sphinx Search
https://github.com/jc21/docker-sphinxsearch
Last synced: 6 months ago
JSON representation
Docker container for Sphinx Search
- Host: GitHub
- URL: https://github.com/jc21/docker-sphinxsearch
- Owner: jc21
- Created: 2018-07-03T03:08:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T00:26:37.000Z (over 3 years ago)
- Last Synced: 2024-04-15T00:38:28.728Z (about 1 year ago)
- Language: Dockerfile
- Size: 9.77 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sphinx Search


[Sphinx Search](http://sphinxsearch.com/) running on Centos 7
Due to the way Sphinx operates, you need to follow these steps:
- Define your Sphinx Configuration - [sphinx.conf](http://sphinxsearch.com/docs/latest/indexing.html)
- Get Sphinx to build the Indexes
- Run the Server
- Rotate the Indexes periodically## Docker Compose Example
```yml
version: "2"
services:
sphinx:
image: jc21/sphinxsearch
ports:
- 9306:9306
- 9312:9312
volumes:
- "./sphinx.conf:/etc/sphinx/sphinx.conf"
- "./data:/var/lib/sphinx"
```## Creating the Indexes
With docker-compose:
```bash
docker-compose run --rm sphinx indexer --all
```With docker vanilla:
```bash
docker run --rm -it \
-v /path/to/sphinx.conf:/etc/sphinx/sphinx.conf \
-v /path/to/data:/var/lib/sphinx \
jc21/sphinxsearch \
indexer --all
```## Running the Sphinx Search Server
With docker-compose:
```bash
docker-compose up -d
```With docker vanilla:
```bash
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/lib/sphinx \
jc21/sphinxsearch
```## Rotating the Indexes
The docker container must be running for rotating to work.
With docker-compose:
```bash
docker-compose exec sphinx indexer --all --rotate
```With docker vanilla (assuming your container name is "sphinxsearch"):
```bash
docker exec -it sphinxsearch indexer --all --rotate
```