Skip to content

The API for statusmc.perchun.it (statusmc.perchun.it/api).

License

Notifications You must be signed in to change notification settings

StatusMC/backend

Repository files navigation

Our Backend

Support Ukraine

Build Status Code style: black Python support versions badge

The API for https://statusmc.perchun.it (public instance is hosted on https://statusmc.perchun.it/api). See https://statusmc.perchun.it/api for API documentation.

It is written in Python 3.8+ using FastAPI framework.

Installing for production

I recommend to only use Docker for production, our image is hosted as perchunpak/statusmc-backend on Dockerhub. So you only need to execute this small bash script:

mkdir data
chmod 777 data # it's enough to set read and write permission, but who cares

docker run -d \
    --name statusmc-backend \
    -p 8000:8000 \
    -v $(pwd)/data:/app/data \
    perchunpak/statusmc-backend

Installing for local developing

git clone https://github.com/StatusMC/backend.git
cd mcstatus-web-backend

Installing poetry

Next we need to install poetry with recommended way.

If you use Linux, use command:

curl -sSL https://install.python-poetry.org | python -

If you use Windows, open PowerShell with admin privileges and use:

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -

Installing dependencies

poetry install

Configuration

All configuration happens in data/config.yml, or with environment variables (they are uppercase config variables).

If something is not clear

You can always write to me!

Thanks

This project was generated with python-template.

About

The API for statusmc.perchun.it (statusmc.perchun.it/api).

Resources

License

Stars

Watchers

Forks