70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
services.rustfs = {
|
|
enable = true;
|
|
environmentFile = config.age.secrets.rustfs-env.path;
|
|
settings = {
|
|
RUSTFS_VOLUMES = "/var/storage/s3";
|
|
|
|
RUSTFS_ADDRESS = ":3008";
|
|
RUSTFS_CONSOLE_ENABLE = "true";
|
|
RUSTFS_CONSOLE_ADDRESS = ":3007";
|
|
|
|
RUST_LOG = "info";
|
|
};
|
|
};
|
|
|
|
# Traefik configuration — same routes as before
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.rustfs-console.loadBalancer.servers = [
|
|
{
|
|
url = "http://localhost:3007/";
|
|
}
|
|
];
|
|
services.rustfs.loadBalancer.servers = [
|
|
{
|
|
url = "http://localhost:3008/";
|
|
}
|
|
];
|
|
|
|
routers.rustfs = {
|
|
rule = "Host(`s3.m3tam3re.com`)";
|
|
tls = {
|
|
certResolver = "godaddy";
|
|
};
|
|
service = "minio";
|
|
entrypoints = "websecure";
|
|
};
|
|
routers.rustfs-console = {
|
|
rule = "Host(`s3c.m3ta.dev`)";
|
|
tls = {
|
|
certResolver = "godaddy";
|
|
};
|
|
service = "rustfs-console";
|
|
entrypoints = "websecure";
|
|
};
|
|
routers.rustfs-old = {
|
|
rule = "Host(`s3.m3ta.dev`)";
|
|
tls = {
|
|
certResolver = "godaddy";
|
|
};
|
|
service = "rustfs";
|
|
entrypoints = "websecure";
|
|
middlewares = ["subdomain-redirect"];
|
|
};
|
|
routers.rustfs-console-old = {
|
|
rule = "Host(`minio.m3tam3re.com`)";
|
|
tls = {
|
|
certResolver = "godaddy";
|
|
};
|
|
service = "rustfs";
|
|
entrypoints = "websecure";
|
|
middlewares = ["subdomain-redirect"];
|
|
};
|
|
};
|
|
}
|