make garage and rclone better
This commit is contained in:
parent
16788bc7b2
commit
9c72baf1c0
3 changed files with 22 additions and 12 deletions
|
@ -10,15 +10,13 @@
|
||||||
api_bind_addr = "[::]:3900";
|
api_bind_addr = "[::]:3900";
|
||||||
root_domain = "s3.cy7.sh";
|
root_domain = "s3.cy7.sh";
|
||||||
};
|
};
|
||||||
s3_web = {
|
|
||||||
bind_addr = "[::]:3902";
|
|
||||||
root_domain = ".web.s3.cy7.sh";
|
|
||||||
index = "index.html";
|
|
||||||
};
|
|
||||||
admin.api_bind_addr = "[::]:3903";
|
admin.api_bind_addr = "[::]:3903";
|
||||||
rpc_bind_addr = "[::]:3901";
|
rpc_bind_addr = "[::]:3901";
|
||||||
replication_factor = 1;
|
replication_factor = 1;
|
||||||
db_engine = "lmdb";
|
db_engine = "lmdb";
|
||||||
|
disable_scrub = true;
|
||||||
|
block_size = "10M";
|
||||||
|
compression_level = 3;
|
||||||
};
|
};
|
||||||
environmentFile = config.sops.secrets."garage/env".path;
|
environmentFile = config.sops.secrets."garage/env".path;
|
||||||
};
|
};
|
||||||
|
@ -31,10 +29,6 @@
|
||||||
reverse_proxy localhost:3900
|
reverse_proxy localhost:3900
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"*.web.s3.cy7.sh".extraConfig = ''
|
|
||||||
import common
|
|
||||||
reverse_proxy localhost:3902
|
|
||||||
'';
|
|
||||||
"admin.s3.cy7.sh".extraConfig = ''
|
"admin.s3.cy7.sh".extraConfig = ''
|
||||||
import common
|
import common
|
||||||
reverse_proxy localhost:3903
|
reverse_proxy localhost:3903
|
||||||
|
|
|
@ -29,6 +29,14 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
job_name = "garage";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "127.0.0.1:3903" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,17 @@
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/garage";
|
ExecStartPre = "/usr/bin/env mkdir -p /mnt/garage";
|
||||||
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
ExecStart = ''
|
||||||
config.sops.secrets."rclone/config".path
|
${lib.getExe pkgs.rclone} mount \
|
||||||
} --cache-dir /var/cache/rclone --transfers=32 --checkers=32 --vfs-cache-mode writes --vfs-cache-max-size 5G --allow-other rsyncnet:garage /mnt/garage ";
|
--config ${config.sops.secrets."rclone/config".path} \
|
||||||
|
--allow-other \
|
||||||
|
--cache-dir /var/cache/rclone \
|
||||||
|
--transfers=32 --checkers=32 \
|
||||||
|
--vfs-cache-mode writes \
|
||||||
|
--vfs-cache-max-size 5G \
|
||||||
|
--dir-cache-time 30d \
|
||||||
|
rsyncnet:garage /mnt/garage
|
||||||
|
'';
|
||||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage";
|
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue