postgres optimization

This commit is contained in:
Danilo Reyes 2023-12-30 02:18:53 -06:00
parent bc97b48c04
commit 7635bb3393
2 changed files with 8 additions and 1 deletions

View File

@ -42,13 +42,13 @@
}; };
ryot = { ryot = {
image = "ghcr.io/ignisda/ryot:latest"; image = "ghcr.io/ignisda/ryot:latest";
ports = [ "8765:8000" ];
environment = { environment = {
TZ = "America/Mexico_City"; TZ = "America/Mexico_City";
DATABASE_URL = "postgres:///ryot?host=${postgresSocket}"; DATABASE_URL = "postgres:///ryot?host=${postgresSocket}";
VIDEO_GAMES_TWITCH_CLIENT_ID = "tfu0hw0zbdbu4lco4h72nqkb8krxp9"; VIDEO_GAMES_TWITCH_CLIENT_ID = "tfu0hw0zbdbu4lco4h72nqkb8krxp9";
VIDEO_GAMES_TWITCH_CLIENT_SECRET = "582ecfb01ihv6wnt8zbc9pf3hs9p54"; VIDEO_GAMES_TWITCH_CLIENT_SECRET = "582ecfb01ihv6wnt8zbc9pf3hs9p54";
}; };
ports = [ "8765:8000" ];
volumes = [ "${postgresSocket}:${postgresSocket}" ]; volumes = [ "${postgresSocket}:${postgresSocket}" ];
labels = { labels = {
"flame.type" = "application"; "flame.type" = "application";

View File

@ -226,6 +226,13 @@ in {
host all all ${localhost}/32 trust host all all ${localhost}/32 trust
host all all ::1/128 trust host all all ::1/128 trust
''; '';
settings = {
dynamic_shared_memory_type = "posix";
max_connections = 100;
max_wal_size = "1GB";
min_wal_size = "80MB";
shared_buffers = "128MB";
};
}; };
}; };
systemd = { systemd = {