GithubHelp home page GithubHelp logo

w-lands / api Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 155 KB

Launcher and minecraft api server for Wl-mc project.

License: GNU Affero General Public License v3.0

Python 96.71% Dockerfile 2.04% Shell 1.25%
fastapi minecraft minecraft-launcher minecraft-server python yggdrasil yggdrasil-minecraft-login

api's Introduction

Wl-mc launcher and minecraft api server

Setup (docker compose)

Requirements:

  • Docker with docker compose plugin
  1. Clone the git repository
    git clone https://github.com/W-Lands/api
  2. Rename example config
    mv .env.example .env
  3. Change config variables
  4. Generate 4096-bit RSA keypair in keys directory
  5. Run:
    docker compose up
  6. Log in into minio admin panel and change wlands-updates bucket policy to:
{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Principal": {"AWS": ["*"]},
        "Action": ["s3:GetObject"],
        "Resource": ["arn:aws:s3:::wlands-updates/*"]
    }]
}

OR
set SET_UPDATES_BUCKET_POLICY environment variable to 1, it will set bucket policy automatically on startup.

Setup (without docker)

Requirements:

  • Python 3.11+
  • Poetry
  1. Clone the git repository
    git clone https://github.com/W-Lands/api
  2. Install dependencies:
    poetry install
  3. Set the following environment variables:
    • DATABASE_URL - Database connection string, for example: mysql://username:[email protected]/wlands
    • S3_ENDPOINT - S3 endpoint, for example: http://127.0.0.1:9000
    • S3_ACCESS_KEY_ID - S3 access key
    • S3_SECRET_ACCESS_KEY - S3 secret key

      Optional variables:
    • SET_UPDATES_BUCKET_POLICY - set to 1 to enable automatic updates bucket policy changing.
  4. Generate 4096-bit RSA keypair in keys directory
  5. Run:
    poetry run uvicorn --workers 4 --host 127.0.0.1 --port 8080 wlands.main:app

api's People

Contributors

ruslanuc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.