fix kubo config #263

Merged
DarkKirb merged 1 commit from fix-kubo-config into main 2023-11-17 15:42:43 +00:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit 0d5cd20036 - Show all commits

View file

@ -15,7 +15,7 @@
}; };
API.HTTPHeaders = { API.HTTPHeaders = {
Access-Control-Allow-Origin = [ Access-Control-Allow-Origin = [
"http://bafybeic4gops3d3lyrisqku37uio33nvt6fqxvkxihrwlqsuvf76yln4fm.ipfs.localhost:41876" "http://bafybeiamycmd52xvg6k3nzr6z3n33de6a2teyhquhj4kspdtnvetnkrfim.ipfs.localhost:41876"
"http://localhost:3000" "http://localhost:3000"
"http://127.0.0.1:5001" "http://127.0.0.1:5001"
"https://webui.ipfs.io" "https://webui.ipfs.io"
@ -37,6 +37,16 @@
prefix = "s3.datastore"; prefix = "s3.datastore";
type = "measure"; type = "measure";
} }
{
child = {
compression = "none";
path = "datastore";
type = "levelds";
};
mountpoint = "/";
prefix = "leveldb.datastore";
type = "measure";
}
]; ];
type = "mount"; type = "mount";
}; };

View file

@ -329,11 +329,12 @@ in {
environment.IPFS_PATH = cfg.dataDir; environment.IPFS_PATH = cfg.dataDir;
preStart = let preStart = let
datastore_spec = pkgs.writeText "datastore_spec" ''{"mounts":[{"bucket":"ipfs","mountpoint":"/"}],"type":"mount"}''; datastore_spec = pkgs.writeText "datastore_spec" ''{"mounts":[{"bucket":"ipfs-chir-rs","mountpoint":"/blocks","region":"ams1","rootDirectory":"/"},{"mountpoint":"/","path":"datastore","type":"levelds"}],"type":"mount"}'';
in in
'' ''
mkdir -pv $IPFS_PATH/.ipfs/plugins mkdir -pv $IPFS_PATH/plugins
ln -svf ${pkgs.go-ds-s3}/bin/go-ds-s3-plugin $IPFS_PATH/.ipfs/plugins cp ${pkgs.go-ds-s3}/go-ds-s3-plugin $IPFS_PATH/plugins
chmod +w $IPFS_PATH/plugins/go-ds-s3-plugin
# Update the datastore_spec # Update the datastore_spec
ln -svf ${datastore_spec} $IPFS_PATH/datastore_spec ln -svf ${datastore_spec} $IPFS_PATH/datastore_spec
if [[ ! -f "$IPFS_PATH/config" ]]; then if [[ ! -f "$IPFS_PATH/config" ]]; then