Hi Steve,
I’m not super familiar with Docker, so I’m not entirely sure what’s appropriate here, but a few thoughts that may help clarify the situation:
Are you trying to have Sphinx be available via a hostname, like your database? Or are you trying to have Sphinx talk to the database via its hostname (“db”)?
In the case of the former: Sphinx should accept hostnames as an alternative to IP addresses for the `address` setting. Are you finding that’s not the case?
In the case of the latter: Thinking Sphinx picks up the database settings from your ActiveRecord connection - thus, it should be using whatever’s in `config/database.yml`. Are you finding that’s not the case in the generated Sphinx configuration file?
In either case: you may want to ask in this GitHub issue, as others who are using Docker and Thinking Sphinx have been sharing their thoughts there:
Also, from a general Sphinx/Thinking Sphinx configuration perspective: the mysql41 setting is what you should use for setting Sphinx’s port in TS v3+. The `port` setting is a legacy from TS v1/v2, and can make the Sphinx daemon confused - best to remove it.
Hope this helps! If you need further clarification, do ask :)
—
Pat