From 26a6a88ac8e40eb20b7588919c475d5550aa4340 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 22 Jul 2024 01:56:27 +0800 Subject: [PATCH] Add Typesense Dashboard to local Docker Compose instances We enable three available endpoints: - http://localhost:8107 (internal server status) - http://localhost:8108 (typesense server and api) - http://localhost:8109 (typesense dashboard) --- config/config.json | 10 ++++++++++ docker-compose.yml | 13 ++++++++++++- guides/running_local_typesense.md | 10 ++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 config/config.json diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..a43c4c1 --- /dev/null +++ b/config/config.json @@ -0,0 +1,10 @@ +{ + "apiKey": "xyz", + "node": { + "host":"localhost", + "port":"8108", + "protocol":"http", + "path":"/", + "tls":false + } +} diff --git a/docker-compose.yml b/docker-compose.yml index 9e6dab9..4a49863 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,18 @@ services: container_name: typesense restart: on-failure ports: - - "8108:8108" + - 8107:8107 # internal status + - 8108:8108 # typesense server volumes: - ./typesense-data:/data command: '--data-dir /data --api-key=xyz --enable-cors' + typesense_dashboard: + image: ghcr.io/bfritscher/typesense-dashboard:latest + container_name: typesense_dashboard + restart: on-failure + ports: + - 8109:80 + volumes: + - ./config/config.json:/srv/config.json + depends_on: + - typesense diff --git a/guides/running_local_typesense.md b/guides/running_local_typesense.md index cb8760e..af9baca 100644 --- a/guides/running_local_typesense.md +++ b/guides/running_local_typesense.md @@ -63,3 +63,13 @@ docker compose logs -f # or specifically Typesense docker container logs --follow --tail 50 typesense ``` + +This Docker Compose setup exposes three services with dedicated URLs: + +- http://localhost:8107 (Internal Server Status), provides information about the + health and status of your internal server. +- http://localhost:8108 (Typesense Server and API), allows you to interact with + the Typesense search engine and its API functionalities. +- http://localhost:8109 (Typesense Dashboard), opens the Typesense web interface + for managing your search collections and settings. +