我应该如何处理版本控制中的 Sphinx 配置?
我的开发工作流程和 Sphinx 有问题。我想在版本控制中保留 Sphinx 的配置文件,以便更容易管理。这意味着更容易将文件链接到代码更新等...但是,配置文件存储在 /usr/local/etc 中。
我能想到的解决方案有两种。将文件存储在存储库中,并在部署时将其移动到正确的文件夹,或者重新编译 Sphinx 以在我的存储库中查找该文件。有人建议我使用符号链接,但这仍然需要对部署进行更改。
我缺少 Sphinx 中的优雅解决方案吗?
I have a problem with my development workflow and Sphinx. I want to keep configuration file for Sphinx in version control so it's easier to manage. This means it's easier to link the file to code updates, etc ... However, the configuration file is stored in /usr/local/etc.
There are two solutions I can think of. Store the file in the repository and move it to the correct folder on deployment or recompile Sphinx to look for the file in my repository. I had a suggestion from someone to use a symlink, but that still requires a change on deployment.
Is there an elegant solution in Sphinx I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许 /usr/local/etc/sphinx.conf 文件是一个脚本,可以从存储库中的文件中提取实际的 sphinx 配置。
http://sphinxsearch.com/docs/current.html#rel098 向下滚动到一般,您会看到:
“为配置文件添加了脚本(shebang 语法)支持(例如:第一行中的 #!/usr/bin/php)”
perhaps have the /usr/local/etc/sphinx.conf file be a script that pulls the actual sphinx config from the file in your repo.
http://sphinxsearch.com/docs/current.html#rel098 scroll down to general and you'll see:
"added scripting (shebang syntax) support to config files (example: #!/usr/bin/php in the first line)"