<https://typesense.org/docs/guide/install-typesens...
# community-help
i
https://typesense.org/docs/guide/install-typesense.html#%F0%9F%86%97-health-check says Health Check You can use the
/health
API end-point to verify that the server is ready to accept requests.
Copy code
curl <http://localhost:8108/health>
{"ok":true}
but that doesnt seem usable when in docker compose
👍 1
m
I installed mine with Docker and was able to successfully
curl
the
/health
endpoint you're running this curl command on the machine that you installed docker on, and your containers are running?
like I didn't use docker compose to run the command itself
e
It might be a different hostname, instead of localhost you need to use the service name
m
It worked for me with localhost, but I run the command on the machine itself, not through docker compose Maybe the ports aren’t set up right with docker?
e
I use docker-compose regularly and the hostname is usually an issue for frontend work... I think there's some stuff you have to set on the networks key.
Workaround is to switch to Lando and set up a proxy URL
Can you post your docker compose yml @Isaiah Joshua Samonte?
i
hi my docker compose yaml is
Copy code
typesense:
    image: typesense/typesense:28.0
    restart: unless-stopped
    ports:
      - 127.0.0.1:8108:8108
    environment:
      TYPESENSE_DATA_DIR: /var/lib/typesense/data
      TYPESENSE_API_KEY: typesense
    volumes:
      - ./typesense/data:/var/lib/typesense/data
    networks:
      - rs-network
thats the typesense section
what i was trying to do is to make it a dependency of other services
Copy code
healthcheck:
      test: ["CMD-SHELL", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 3
something like that, but that is for redis, which works
just curious if there's a typesense equivalent
e
try getting rid of
Copy code
networks:
      - rs-network
in the entire yml file, just to test if that resolves the issue
i haven't actually implemented the healthcheck on my local dev, it's a good exercise 👍