Enable caching for gitea
This commit is contained in:
parent
d6a6d87307
commit
42c9150902
1 changed files with 31 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
|
redisSocket = "127.0.0.1:6379";
|
||||||
cfg = config.dadada.gitea;
|
cfg = config.dadada.gitea;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -20,6 +21,36 @@ in
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
};
|
};
|
||||||
disableRegistration = true;
|
disableRegistration = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
LANDING_PAGE = "explore";
|
||||||
|
OFFLINE_MODE = true;
|
||||||
|
};
|
||||||
|
picture = {
|
||||||
|
DISABLE_GRAVATAR = true;
|
||||||
|
REPOSITORY_AVATAR_FALLBACK = "random";
|
||||||
|
ENABLE_FEDERATED_AVATAR = false;
|
||||||
|
};
|
||||||
|
other = {
|
||||||
|
SHOW_FOOTER_BRANDING = false;
|
||||||
|
SHOW_FOOTER_VERSION = false;
|
||||||
|
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
|
||||||
|
};
|
||||||
|
log = {
|
||||||
|
DISABLE_ROUTER_LOG = true;
|
||||||
|
};
|
||||||
|
cache = {
|
||||||
|
ENABLE = true;
|
||||||
|
ADAPTER = "redis";
|
||||||
|
HOST = "network=tcp,addr=${redisSocket},db=0,pool_size=100,idle_timeout=180";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.redis = {
|
||||||
|
enable = true;
|
||||||
|
vmOverCommit = true;
|
||||||
|
#unixSocket = redisSocket;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."git.${config.networking.domain}" = {
|
services.nginx.virtualHosts."git.${config.networking.domain}" = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue