Skip to content

mine_search is a lightweight Minecraft server search engine.

License

Notifications You must be signed in to change notification settings

kauri-off/mine_search

Repository files navigation

MineSearch Setup Guide

MineSearch is a Minecraft server search engine that uses a PostgreSQL database. Below is a step-by-step guide to setting it up.

Prerequisites

Environment Variables

Create a .env file in the root directory and add the following values:

POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_DB=mine_search_db

BACKEND_PASSWORD=password

THREADS=900
ONLY_UPDATE=false

Installation

1. Clone the repository

git clone https://github.com/kauri-off/mine_search
cd mine_search

2. Install Diesel CLI

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/diesel-rs/diesel/releases/latest/download/diesel_cli-installer.sh | sh

To verify the installation, run:

diesel --version

3. Start PostgreSQL

docker compose up postgres -d

4. Set up environment variables

export $(grep -v '^#' .env | xargs)
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@127.0.0.1:5432/${POSTGRES_DB}"

5. Run database migrations

cd db_schema
~/.cargo/bin/diesel migration run

Running the Application

You can run the application in two ways: by building the code locally or by using prebuilt images from GitHub Container Registry (GHCR).

Option 1: Build Locally

You don't have to modify anything; Docker Compose is already configured to build locally.

Run the application:

docker compose up -d --build

Option 2: Use Prebuilt Images

Modify the docker-compose.yml file to use GHCR images:

services:
  worker:
    #    build:
    #      context: .
    #      dockerfile: worker.Dockerfile
    image: ghcr.io/kauri-off/mine_search/worker:latest

  backend:
    #    build:
    #      context: .
    #      dockerfile: backend.Dockerfile
    image: ghcr.io/kauri-off/mine_search/backend:latest

Run the application:

docker compose up -d

Configure a Domain and Proxy

If you have a domain and want to configure it for reverse proxy, run:

./setup.sh

This will update the domain name in Nginx and Caddy configuration files.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Contributing

Contributions are welcome! Open issues or submit pull requests to improve the project.

Acknowledgements

About

mine_search is a lightweight Minecraft server search engine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages