louije
Connecting to a Meilisearch service through the internal network
Ohhh, got it:
The correct address was
http://search.railway.internal:3331
, which I had already tried. But to make it work, I had to change the Meilisearch service's MEILI_HTTP_ADDR
, where it listens to requests, to [::]:3331
instead of 0.0.0.0:3331
.20 replies
Connecting to a Meilisearch service through the internal network
thanks both for your replies. My connection string is something like
const client = new MeiliSearch({ host: process.env.MEILI_URL, apiKey: process.env.MEILI_MASTER_KEY });
.
It works perfectly well when the MEILI_URL is something like https://my-search-service.up.railway.app
. It fails when it's something like http://search.railway.internal
or http://search.railway.internal:3331
.
I'd be curious if other people have been using the Meilisearch template and how they've configured it. Right now, I have a solution but I'd rather not keep the search server exposed (even if it requires a key to handle requests).20 replies