我应该如何处理版本控制中的 Sphinx 配置?

发布于 2024-09-17 05:41:31 字数 243 浏览 7 评论 0原文

我的开发工作流程和 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我家小可爱 2024-09-24 05:41:31

也许 /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)"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文