2024-10-18 04:19:53 -06:00
# Myrient Search Engine
2024-10-27 22:47:17 -03:00
It is finally here. There is now a way to search all of Myrient's offerings.
2024-10-24 06:28:23 -06:00
[Myrient Search ](https://myrient.mahou.one ) can be accessed by clicking the link.
2024-10-27 22:47:17 -03:00
# Resource Requirements
2025-01-28 20:43:27 -03:00
- 1.5GB-ish of memory for the initial crawl (can be reduced by tweaking environment variables at the cost of slower indexing)
- 800MB-ish of memory for running the server
2024-10-18 04:19:53 -06:00
# Self-Hosting
2024-10-27 22:47:17 -03:00
## Docker Method (Recommended)
### Requirements
2025-01-28 20:43:27 -03:00
- Docker / Docker Compose
2024-10-27 22:47:17 -03:00
### Instructions
1. Download the `docker-compose.yml` file
2. Start the server with `docker-compose up -d`
## Manual Method (Development)
### Requirements
- nodejs
- npm
2025-01-28 20:43:27 -03:00
- PostgreSQL
- Elasticsearch
- Docker (optional)
2024-10-27 22:47:17 -03:00
### Instructions
2024-10-18 04:28:26 -06:00
1. Clone the repository. `git clone https://github.com/alexankitty/Myrient-Search-Engine`
2024-10-18 04:19:53 -06:00
2. Install dependencies. `npm i`
2025-01-28 20:43:27 -03:00
3. Run your PostgreSQL and Elasticsearch instances. A docker compose file is provided in the repository for convenience.
4. Start the server. `node server.js`
2024-10-18 04:19:53 -06:00
2024-10-27 22:47:17 -03:00
# HTTPS Encryption
Use something like `nginx` and add a site to sites-available called myrient-search in `/etc/ngix/sites-available` .
Link the site to the sites-enabled folder. `ln -sf /etc/nginx/sites-available/myrient-search /etc/nginx/sites-enabled/myrient-search`
2024-10-18 04:19:53 -06:00
## nginx Site Template
```
server {
listen 80;
listen [::]:80;
server_name server address.tld
root /usr/share/nginx
access_log on;
}
#server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name serveraddress.tld;
access_log on;
root /usr/share/nginx;
location / {
add_header Cache-Control no-cache;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8062/;
}
}
```
## SSL Certificate
2024-10-27 22:47:17 -03:00
For the SSL certificate you can use certbot via the `certbot -d servername.tld` command and adding it to your `crontab` .
2024-10-25 04:08:03 -06:00
[Additional Information for Certbot Setup ](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04 )
# Contributing
2024-10-27 22:47:17 -03:00
You know the usual fluff.
Is there a missing category or string association? `lib/categories.json` and `lib/searchalikes.json` can both updated to include these. If you do update/improve these, please put in a pull request so that it can be added to the public hosted server, as well.