From 7e8fef4d2ec1cc7e6c5394745081f4377045caa6 Mon Sep 17 00:00:00 2001 From: itepechi <72330683+itepechi@users.noreply.github.com> Date: Sat, 16 Sep 2023 07:56:18 +0900 Subject: [PATCH] Update README --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ca69abef..c2ada9e36 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ The main differences between this and the upstream repository are - Files/directories to mount are minified and completely separated from the repository files, allowing better control over file permissions - Has an actual Docker entry point, rather than a command that pretends to be an entry point - Includes out-of-the-box support for [PGroonga](https://pgroonga.github.io/), the fast and accurate full-text search extension for PostgreSQL +- Includes support for finding media states, which I really needed +- Includes some improvements to the initial configuration wizard - Supports Podman quite well ## How to setup (Podman Rootless) @@ -18,7 +20,7 @@ _You don't need to replicate backslashes followed by line breaks. They mean "Ign ### 0. Requirements - A decent CPU -- 2GB of memory (200MB runtime) +- 2GB memory (200MB runtime +300MB if you want to use Meilisearch) - 500MB free disk space - Podman runs as non-root user @@ -49,7 +51,7 @@ podman pod create \ akkoma ``` -### 3. Setting up the database +### 3. Set up the database ```sh podman run -d \ @@ -77,7 +79,7 @@ podman run -d \ groonga/pgroonga:3.1.1-alpine-14 ``` -### 4. Setting up the backend +### 4. Set up the backend ```sh podman run -d \ @@ -121,6 +123,32 @@ podman exec -it akkoma-web \ You can revert the applied changes at any time by replacing `migrate` with `rollback`. +### 4.2 Set up Meilisearch if you want to search with it + +_This step is optional._ + +```sh +podman run -d \ + --pod akkoma-pod \ + --restart unless-stopped \ + --name akkoma-meili \ + -e MEILI_NO_ANALYTICS=true \ + -v ${PWD}/meili_data/:/meili_data/:Z \ + getmeili/meilisearch:v1.3 +``` + +Don't forget to update your configuration to use Meilisearch. + +```ex +# Example configuration +config :pleroma, Pleroma.Search, module: Pleroma.Search.Meilisearch +config :pleroma, Pleroma.Search.Meilisearch, url: "http://localhost:7700/" +``` + +To learn how to feed the Meilisearch index with your existing posts, if you have them, please see [the guide below](#initial-indexing-with-meilisearch). + +For other questions, see [the official documentation](https://docs.akkoma.dev/stable/configuration/search/#meilisearch). + ### 5. Test your setup ```sh @@ -130,7 +158,7 @@ curl -I http://localhost:YOUR_PORT/ You should see `HTTP/1.1 200 OK`. -### 6. Setting up the frontend +### 6. Set up the frontend ```sh podman exec -it akkoma-web \ @@ -233,6 +261,17 @@ podman exec -it akkoma-web \ set_pgroonga_options "tokenizer='TokenMecab',lexicon_type='hash_table'" ``` +#### Initial indexing with Meilisearch + +If you have posts that were made before Meilisearch was enabled, run the command below to index them. + +```sh +podman exec -it akkoma-web \ + pleroma_ctl \ + search.meilisearch \ + index +``` + --- ## Akkoma