-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from kianmeng/revise-instruction-on-bootstrap-…
…local-typesense-instance Revise instruction on running local Typesense instance
- Loading branch information
Showing
8 changed files
with
136 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
MIT License | ||
# MIT License | ||
|
||
Copyright (c) 2021 Jaeyson Anthony Y. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3" | ||
services: | ||
typesense: | ||
image: docker.io/typesense/typesense:0.25.2 | ||
container_name: typesense | ||
tty: true | ||
restart: on-failure | ||
environment: | ||
- TYPESENSE_DATA_DIR=/data | ||
- TYPESENSE_API_KEY=xyz | ||
volumes: | ||
- ./typesense-data:/data | ||
ports: | ||
# for internal status of the typesense server | ||
- 8107:8107 | ||
# for actual typesense server | ||
- 8108:8108 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Running local Typesense | ||
|
||
This document guides you through setting up a local Typesense instance for | ||
development purposes. Running a local instance allows you to experiment with | ||
search functionalities and integrate them into your development workflow | ||
seamlessly. | ||
|
||
## Prerequisites | ||
|
||
Before we begin, ensure you have the following installed on your development | ||
machine: | ||
|
||
- Docker: <https://www.docker.com/> - Docker provides a containerization platform | ||
for running Typesense in an isolated environment. | ||
|
||
- Docker Compose: <https://docs.docker.com/compose/install/> - Docker Compose | ||
helps manage multi-container applications like Typesense. | ||
|
||
|
||
## Setting up | ||
|
||
We are using Docker compose to bootstrap a local Typesense instance from a | ||
sample `docker-compose.yml` file. | ||
|
||
|
||
Clone the `ex_typesense` GitHub repository: | ||
|
||
```bash | ||
git clone https://github.com/jaeyson/ex_typesense.git | ||
``` | ||
|
||
Navigate to the cloned GitHub repository start the Typesense instance: | ||
|
||
```bash | ||
cd ex_typesense | ||
docker-compose up -d | ||
``` | ||
|
||
Once you've started Typesense, you can verify its installation by accessing the | ||
health endpoint through a browser or `curl` in the terminal: | ||
|
||
```bash | ||
$ curl http://localhost:8108/health | ||
{"ok":true} | ||
``` | ||
|
||
In a separate terminal, you can view the logs of your local Typesense instance | ||
using following command: | ||
|
||
```bash | ||
docker-compose logs -f | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters