This commit is contained in:
parent
5086aba848
commit
e183e8310c
2 changed files with 44 additions and 38 deletions
|
|
@ -102,34 +102,40 @@
|
|||
secretKeyFile = "/var/cache-priv-key.pem";
|
||||
};
|
||||
|
||||
prometheus = {
|
||||
enable = true;
|
||||
scrapeConfigs = [{
|
||||
job_name = "ratchat-server";
|
||||
static_configs = [{
|
||||
targets = [ "127.0.0.1:9011" ];
|
||||
}];
|
||||
}];
|
||||
};
|
||||
|
||||
grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 3000;
|
||||
prometheus = {
|
||||
enable = true;
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "ratchat-server";
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["127.0.0.1:9011"];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings.datasources = [{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://localhost:9090";
|
||||
}];
|
||||
};
|
||||
};
|
||||
grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 3000;
|
||||
};
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://localhost:9090";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
ollama = {
|
||||
enable = true;
|
||||
|
|
@ -224,13 +230,13 @@ grafana = {
|
|||
|
||||
nginx = {
|
||||
enable = true;
|
||||
commonHttpConfig = ''
|
||||
map $http_authorization $is_allowed_user {
|
||||
default 0;
|
||||
"Bearer ratToken" 1;
|
||||
"Bearer notRatToken" 1;
|
||||
}
|
||||
'';
|
||||
commonHttpConfig = ''
|
||||
map $http_authorization $is_allowed_user {
|
||||
default 0;
|
||||
"Bearer ratToken" 1;
|
||||
"Bearer notRatToken" 1;
|
||||
}
|
||||
'';
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
clientMaxBodySize = "4g";
|
||||
|
|
@ -265,9 +271,9 @@ commonHttpConfig = ''
|
|||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:9011";
|
||||
extraConfig = ''
|
||||
if ($is_allowed_user = 0) { return 401; }
|
||||
'';
|
||||
extraConfig = ''
|
||||
if ($is_allowed_user = 0) { return 401; }
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue