Fix instructions for switching to PGroonga
This commit is contained in:
parent
059f3c4299
commit
5c19b8820f
1 changed files with 18 additions and 26 deletions
44
README.md
44
README.md
|
@ -161,13 +161,24 @@ Follow the printed link to set your password.
|
|||
|
||||
#### Switch to PGroonga
|
||||
|
||||
Before moving forward, make sure you have stopped the backend for safety.
|
||||
Before proceeding, make sure you set `config :pleroma, :database, pgroonga_enabled` to `false`.
|
||||
|
||||
```sh
|
||||
podman stop akkoma-web
|
||||
```ex
|
||||
config :pleroma, :database,
|
||||
rum_enabled: false,
|
||||
pgroonga_enabled: false
|
||||
```
|
||||
|
||||
After stopping the backend, change `config :pleroma, :database, pgroonga_enabled` to `true`.
|
||||
Then, run the command below to apply optional migrations to switch to PGroonga.
|
||||
|
||||
```sh
|
||||
podman exec -it akkoma-web \
|
||||
pleroma_ctl \
|
||||
migrate \
|
||||
--migrations-path priv/repo/optional_migrations/pgroonga
|
||||
```
|
||||
|
||||
After running the migration, change `config :pleroma, :database, pgroonga_enabled` to `true`.
|
||||
|
||||
```ex
|
||||
config :pleroma, :database,
|
||||
|
@ -175,32 +186,13 @@ config :pleroma, :database,
|
|||
pgroonga_enabled: true # set this option to true
|
||||
```
|
||||
|
||||
If you have command history enabled in your shell, all you need to do is remove the `--name NAME` option and add `pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/pgroonga` to the end of the command.
|
||||
Don't forget to restart your backend for the changes to take effect.
|
||||
|
||||
```sh
|
||||
podman run -d \
|
||||
--pod akkoma-pod \
|
||||
--restart unless-stopped \ # this option is optional (bruh)
|
||||
# --name akkoma-web \ # make sure to remove this option to avoid name conflict
|
||||
-e DB_NAME=YOUR_DB_NAME \
|
||||
-e DB_USER=YOUR_DB_USER \
|
||||
-e DB_PASS=YOUR_DB_PASS \
|
||||
-v ${PWD}/static/:/var/lib/akkoma/static/:Z \
|
||||
-v ${PWD}/uploads/:/var/lib/akkoma/uploads/:Z \
|
||||
-v ${PWD}/etc/:/etc/akkoma/:Z \
|
||||
akkoma \
|
||||
pleroma_ctl \
|
||||
migrate \
|
||||
--migrations-path priv/repo/optional_migrations/pgroonga
|
||||
podman restart akkoma-web
|
||||
```
|
||||
|
||||
You can revert the applied changes anytime by replacing `migrate` with `rollback`.
|
||||
|
||||
Don't forget to start the container you stopped at the beginning of this guide.
|
||||
|
||||
```sh
|
||||
podman start akkoma-web
|
||||
```
|
||||
You can revert the applied changes at any time by replacing `migrate` with `rollback`.
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in a new issue