mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
chore: Add docs for Meilisearch setup
This commit is contained in:
parent
34faf28088
commit
04ff66ad8b
|
|
@ -72,6 +72,7 @@ Lysand is extremely fast and can handle tens of thousands of HTTP requests per s
|
||||||
- The [Bun Runtime](https://bun.sh), version 1.0.5 or later (usage of the latest version is recommended)
|
- The [Bun Runtime](https://bun.sh), version 1.0.5 or later (usage of the latest version is recommended)
|
||||||
- A PostgreSQL database
|
- A PostgreSQL database
|
||||||
- (Optional but recommended) A Linux-based operating system
|
- (Optional but recommended) A Linux-based operating system
|
||||||
|
- (Optional if you want search) A working Meiliseach instance
|
||||||
|
|
||||||
> **Note**: We will not be offerring support to Windows or MacOS users. If you are using one of these operating systems, please use a virtual machine or container to run Lysand.
|
> **Note**: We will not be offerring support to Windows or MacOS users. If you are using one of these operating systems, please use a virtual machine or container to run Lysand.
|
||||||
|
|
||||||
|
|
@ -125,6 +126,10 @@ RUN chmod +x /docker-entrypoint-initdb.d/init.sh
|
||||||
bun migrate
|
bun migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
|
6. (If you want search)
|
||||||
|
Create a Meilisearch instance (using Docker is recommended). For a [`docker-compose`] file, copy the `meilisearch` service from the [`docker-compose.yml`](docker-compose.yml) file.
|
||||||
|
|
||||||
|
Set up Meiliseach's API key by passing the `MEILI_MASTER_KEY` environment variable to the server. Then, enale and configure search in the config file.
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
To run the server, simply run the following command:
|
To run the server, simply run the following command:
|
||||||
|
|
@ -149,6 +154,10 @@ Some CLI commands that return data as tables can be used in scripts. To do so, y
|
||||||
|
|
||||||
Flags can be used in any order and anywhere in the script (except for the `bun cli` command itself). The command arguments themselves must be in the correct order, however.
|
Flags can be used in any order and anywhere in the script (except for the `bun cli` command itself). The command arguments themselves must be in the correct order, however.
|
||||||
|
|
||||||
|
### Rebuilding the Search Index
|
||||||
|
|
||||||
|
You may use the `bun cli index rebuild` command to automatically push all posts and users to Meilisearch, if it is configured. This is useful if you have just set up Meilisearch, or if you accidentally deleted something.
|
||||||
|
|
||||||
### Using Database Commands
|
### Using Database Commands
|
||||||
|
|
||||||
The `bun prisma` commands allows you to use Prisma commands without needing to add in environment variables for the database config. Just run Prisma commands as you would normally, replacing `bunx prisma` with `bun prisma`.
|
The `bun prisma` commands allows you to use Prisma commands without needing to add in environment variables for the database config. Just run Prisma commands as you would normally, replacing `bunx prisma` with `bun prisma`.
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,17 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- lysand-net
|
- lysand-net
|
||||||
|
meilisearch:
|
||||||
|
stdin_open: true
|
||||||
|
environment:
|
||||||
|
- MEILI_MASTER_KEY=add_your_key_here
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- lysand-net
|
||||||
|
volumes:
|
||||||
|
- ./meili-data:/meili_data
|
||||||
|
image: getmeili/meilisearch:v1.5
|
||||||
|
container_name: lysand-meilisearch
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
lysand-net:
|
lysand-net:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue