mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
nixos/mastodon: use redis.servers
This commit is contained in:
parent
c3e292745b
commit
0f69a517a4
@ -1879,6 +1879,37 @@
|
||||
during the time when the timer was inactive.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Mastodon now uses <literal>services.redis.servers</literal> to
|
||||
start a new redis server, instead of using a global redis
|
||||
server. This improves compatibility with other services that
|
||||
use redis.
|
||||
</para>
|
||||
<para>
|
||||
Note that this will recreate the redis database, although
|
||||
according to the
|
||||
<link xlink:href="https://docs.joinmastodon.org/admin/backups/">Mastodon
|
||||
docs</link>, this is almost harmless:
|
||||
</para>
|
||||
<blockquote>
|
||||
<para>
|
||||
Losing the Redis database is almost harmless: The only
|
||||
irrecoverable data will be the contents of the Sidekiq
|
||||
queues and scheduled retries of previously failed jobs. The
|
||||
home and list feeds are stored in Redis, but can be
|
||||
regenerated with tootctl.
|
||||
</para>
|
||||
</blockquote>
|
||||
<para>
|
||||
If you do want to save the redis database, you can use the
|
||||
following commands:
|
||||
</para>
|
||||
<programlisting language="bash">
|
||||
redis-cli save
|
||||
cp /var/lib/redis/dump.rdb "/var/lib/redis-mastodon/dump.rdb"
|
||||
</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If you are using Wayland you can choose to use the Ozone
|
||||
|
@ -699,6 +699,20 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
By default auto-upgrade will now run immediately if it would have been triggered at least
|
||||
once during the time when the timer was inactive.
|
||||
|
||||
- Mastodon now uses `services.redis.servers` to start a new redis server, instead of using a global redis server.
|
||||
This improves compatibility with other services that use redis.
|
||||
|
||||
Note that this will recreate the redis database, although according to the [Mastodon docs](https://docs.joinmastodon.org/admin/backups/),
|
||||
this is almost harmless:
|
||||
> Losing the Redis database is almost harmless: The only irrecoverable data will be the contents of the Sidekiq queues and scheduled retries of previously failed jobs.
|
||||
> The home and list feeds are stored in Redis, but can be regenerated with tootctl.
|
||||
|
||||
If you do want to save the redis database, you can use the following commands:
|
||||
```bash
|
||||
redis-cli save
|
||||
cp /var/lib/redis/dump.rdb "/var/lib/redis-mastodon/dump.rdb"
|
||||
```
|
||||
|
||||
- If you are using Wayland you can choose to use the Ozone Wayland support
|
||||
in Chrome and several Electron apps by setting the environment variable
|
||||
`NIXOS_OZONE_WL=1` (for example via
|
||||
|
@ -294,7 +294,7 @@ in {
|
||||
port = lib.mkOption {
|
||||
description = "Redis port.";
|
||||
type = lib.types.port;
|
||||
default = 6379;
|
||||
default = 31637;
|
||||
};
|
||||
};
|
||||
|
||||
@ -605,8 +605,10 @@ in {
|
||||
enable = true;
|
||||
hostname = lib.mkDefault "${cfg.localDomain}";
|
||||
};
|
||||
services.redis = lib.mkIf (cfg.redis.createLocally && cfg.redis.host == "127.0.0.1") {
|
||||
services.redis.servers.mastodon = lib.mkIf (cfg.redis.createLocally && cfg.redis.host == "127.0.0.1") {
|
||||
enable = true;
|
||||
port = cfg.redis.port;
|
||||
bind = "127.0.0.1";
|
||||
};
|
||||
services.postgresql = lib.mkIf databaseActuallyCreateLocally {
|
||||
enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user