mirror of
https://github.com/YGGverse/Yo.git
synced 2025-02-05 03:14:33 +00:00
change config location
This commit is contained in:
parent
905af165fb
commit
72f2fdaeca
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/storage/
|
||||
/vendor/
|
||||
composer.lock
|
||||
composer.lock
|
||||
config.json
|
10
README.md
10
README.md
@ -2,16 +2,16 @@
|
||||
|
||||
Next generation of [YGGo!](https://github.com/YGGverse/YGGo) project with goal to reduce server requirements and make deployment process simpler
|
||||
|
||||
- Index model changed to the distributed cluster model, and oriented to aggregate search results from different instances trough API
|
||||
- Refactored data exchange model with drop all primary keys dependencies
|
||||
- Index model changed to distributed cluster model, and now oriented to aggregate search results from network instances trough API
|
||||
- Refactored data exchange model where drop all internal keys dependencies
|
||||
- Snaps now using tar.gz compression to reduce storage requirements and still supporting remote mirrors, FTP including
|
||||
- Minimalism everywhere
|
||||
|
||||
## Implementation
|
||||
|
||||
Engine written in PHP and uses [Manticore](https://github.com/manticoresoftware) on backend.
|
||||
Engine written in PHP 8 and uses [Manticore](https://github.com/manticoresoftware) on backend.
|
||||
|
||||
Default build inspired and adapted for [Yggdrasil](https://github.com/yggdrasil-network) but could be used to make internet search portal.
|
||||
Default build adapted for [Yggdrasil](https://github.com/yggdrasil-network) but could be used to make internet search portal.
|
||||
|
||||
## Components
|
||||
|
||||
@ -29,7 +29,7 @@ Default build inspired and adapted for [Yggdrasil](https://github.com/yggdrasil-
|
||||
1. Install `composer`, `php` and `manticore`
|
||||
2. Grab latest `Yo` version `git clone https://github.com/YGGverse/Yo.git`
|
||||
3. Run `composer update` inside the project directory
|
||||
4. Check `src/config.json` for any customizations
|
||||
4. Copy and customize config file `cp example/config.json config.json`
|
||||
5. Make sure `storage` folder writable
|
||||
6. Run indexes init script `php src/cli/index/init.php`
|
||||
7. Add new URL `php src/cli/document/add.php URL`
|
||||
|
@ -6,7 +6,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
__DIR__ . '/../../config.json'
|
||||
__DIR__ . '/../../../config.json'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -14,7 +14,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
__DIR__ . '/../../config.json'
|
||||
__DIR__ . '/../../../config.json'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -6,7 +6,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
__DIR__ . '/../../config.json'
|
||||
__DIR__ . '/../../../config.json'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -6,7 +6,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
__DIR__ . '/../../config.json'
|
||||
__DIR__ . '/../../../config.json'
|
||||
)
|
||||
);
|
||||
|
||||
|
107
src/config.json
107
src/config.json
@ -1,107 +0,0 @@
|
||||
{
|
||||
"manticore":
|
||||
{
|
||||
"server":
|
||||
{
|
||||
"host":"127.0.0.1",
|
||||
"port":9308
|
||||
},
|
||||
"index":
|
||||
{
|
||||
"document":"yo_document"
|
||||
}
|
||||
},
|
||||
"webui":
|
||||
{
|
||||
"url":
|
||||
{
|
||||
"base":"http://127.0.0.1:8888"
|
||||
},
|
||||
"pagination":
|
||||
{
|
||||
"limit":20
|
||||
}
|
||||
},
|
||||
"cli":
|
||||
{
|
||||
"document":
|
||||
{
|
||||
"crawl":
|
||||
{
|
||||
"queue":
|
||||
{
|
||||
"limit":1,
|
||||
"delay":1
|
||||
},
|
||||
"selector":
|
||||
{
|
||||
"a:not([rel=nofollow])":
|
||||
{
|
||||
"attribute":"href",
|
||||
"external":false,
|
||||
"regex":"/.*/ui"
|
||||
},
|
||||
"image":
|
||||
{
|
||||
"attribute":"src",
|
||||
"external":true,
|
||||
"regex":"/.*/ui"
|
||||
},
|
||||
"audio":
|
||||
{
|
||||
"attribute":"src",
|
||||
"external":false,
|
||||
"regex":"/.*/ui"
|
||||
},
|
||||
"video":
|
||||
{
|
||||
"attribute":"src",
|
||||
"external":false,
|
||||
"regex":"/.*/ui"
|
||||
},
|
||||
"script":
|
||||
{
|
||||
"attribute":"href",
|
||||
"external":false,
|
||||
"regex":"/.*/ui"
|
||||
}
|
||||
},
|
||||
"snap":
|
||||
{
|
||||
"enabled":true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"snap":
|
||||
{
|
||||
"storage":
|
||||
{
|
||||
"local":{
|
||||
"enabled":true,
|
||||
"directory":"storage/snap",
|
||||
"size":
|
||||
{
|
||||
"max":100024
|
||||
},
|
||||
"mime":
|
||||
[
|
||||
"application/xhtml+xml",
|
||||
"application/javascript",
|
||||
"text/html",
|
||||
"text/plain",
|
||||
"text/css",
|
||||
"image/webp",
|
||||
"image/png",
|
||||
"image/gif",
|
||||
"image/ico"
|
||||
]
|
||||
},
|
||||
"mirror":
|
||||
{
|
||||
"enabled":false,
|
||||
"ftp":[]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
__DIR__ . '/../config.json'
|
||||
__DIR__ . '/../../config.json'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -11,7 +11,7 @@ require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
__DIR__ . '/../config.json'
|
||||
__DIR__ . '/../../config.json'
|
||||
)
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user