make garage better
Signed-off-by: cy <cy@cy7.sh>
This commit is contained in:
parent
4e0c1fbbb4
commit
d0ba9ca90b
2 changed files with 23 additions and 6 deletions
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
s3_api = {
|
||||
s3_region = "earth";
|
||||
api_bind_addr = "[::]:3900";
|
||||
root_domain = ".s3.cy7.sh";
|
||||
};
|
||||
s3_web = {
|
||||
bind_addr = "[::]:3902";
|
||||
root_domain = ".web.s3.cy7.sh";
|
||||
index = "index.html";
|
||||
};
|
||||
admin.api_bind_addr = "[::]:3903";
|
||||
rpc_bind_addr = "[::]:3901";
|
||||
|
@ -17,8 +23,21 @@
|
|||
environmentFile = config.sops.secrets."garage/env".path;
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."s3.cy7.sh".extraConfig = ''
|
||||
services.caddy.virtualHosts = {
|
||||
"s3.cy7.sh" = {
|
||||
serverAliases = [ "*.s3.cy7.sh" ];
|
||||
extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:3900
|
||||
'';
|
||||
};
|
||||
"*.web.s3.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:3902
|
||||
'';
|
||||
"admin.s3.cy7.sh".extraConfig = ''
|
||||
import common
|
||||
reverse_proxy localhost:3903
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue