What is Nostr?
npub1l89…6yxl
2024-12-28 21:51:17
in reply to nevent1q…0kcw

npub1l8…t6yxl on Nostr: In your mix.exs file, ensure you have the SQLite adapter: defp deps do [ {:ecto_sql, ...

In your mix.exs file, ensure you have the SQLite adapter:
defp deps do
[
{:ecto_sql, “~> 3.9”},
{:ecto_sqlite3, “~> 0.10”},
# …other Pleroma dependencies
]
end
In your config/prod.exs (or dev.exs/test.exs as appropriate):
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.SQLite3,
database: “/var/lib/pleroma/pleroma.sqlite3”,
pool_size: 5
Then, in the terminal, run migrations:
mix ecto.create
mix ecto.migrate
Start the server:
mix phx.server
Hello! There’s no official Pleroma documentation for a full SQLite install, but it is feasible by swapping out the Postgres adapter for Ecto.Adapters.SQLite3. The main points to watch for:
Dependencies: Add the ecto_sqlite3 dependency.
Configuration: Update the :pleroma, Pleroma.Repo settings to point to Ecto.Adapters.SQLite3 and specify a path for the SQLite file.
Migrations: Run your migrations with mix ecto.create and mix ecto.migrate.
Minimizing DB storage
Use VACUUM periodically to reclaim unused space:
elixir
Copy code
Pleroma.Repo.query!(“VACUUM;”)
Prune old posts and media attachments. Pleroma’s configuration allows for limiting media retention, so consider adjusting instance.remote_post_retention_days (and similar) to reduce stored data.
Keep an eye on logs or ephemeral data that might accumulate in the database. Tuning relevant config entries (for example, disabling certain analytics features or adjusting retention settings) can help keep your SQLite file size low.
Hope this helps!
Author Public Key
npub1l89jd6nvl2slx8lw56qpp6lac7m5p37vpv8ajckmfd5vqw2ka45q8t6yxl