Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Xapiand production ready docker container #12

Closed
vit1251 opened this issue Mar 28, 2019 · 6 comments
Closed

Add Xapiand production ready docker container #12

vit1251 opened this issue Mar 28, 2019 · 6 comments

Comments

@vit1251
Copy link
Contributor

vit1251 commented Mar 28, 2019

Most popular solution ElasticSearch provide Docker container production ready on https://hub.docker.com/_/elasticsearch

How about create some similar solution and provide user simple way to try Xapiand?

@Kronuz
Copy link
Owner

Kronuz commented Mar 28, 2019

I absolutely agree... but what are the differences in that image, vs our own Docker image?

@vit1251
Copy link
Contributor Author

vit1251 commented Mar 29, 2019

Current Docker container store index inside container and it lost data when stop or restart container. May be use VOLUME to store index on host machine? Do u have benchmark and get any performance issue with VOLUME in Docker?

@cbess
Copy link

cbess commented May 16, 2019

As far as I can tell, you can use the -v option to mount the /var/db/xapiand/ directory on the host. It worked for me. However, restarting the container is a different issue:

Node name 6f9e78432364 doesn't match with the one in the cluster's database!

How do I provide the node name upon startup?

Mount option:

-v /my/host/dir/xapiand:/var/db/xapiand

Full example:

docker run -p 8880:8880 -v /my/host/dir/xapiand:/var/db/xapiand --rm dubalu/xapiand:0.22.0 -vvv

BTW, many thanks @Kronuz for sharing this project! I'm loving the potential of seeing a viable and easy to setup ElasticSearch and Sphinxsearch alternative! Great codebase as well!

@Kronuz
Copy link
Owner

Kronuz commented May 16, 2019

Thank you @cbess.
You can use --name NodeName as a parameter (or it should work) you can also set the XAPIAND_NAME environment variable. The default for the node name in Docker is the host name, so you probably can also request Docker to use a different hostname.

@cbess
Copy link

cbess commented May 16, 2019

Awesome, I just tested it, worked perfectly! Thanks for the prompt response. I'm definitely excited to see this project become more visible!

Working command to have persistent Xapiand data in Docker:

docker run -p 8880:8880 -v /tmp/xapiand:/var/db/xapiand --rm dubalu/xapiand:0.22.0 -vvv --name myxapiand

@vit1251 Looks like we don't need any modifications for persistent data.

@cbess
Copy link

cbess commented May 16, 2019

I think this can be closed out.

@Kronuz Kronuz closed this as completed May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants