Skip to content

Server side infrastructure for the OSCR parser.

License

Notifications You must be signed in to change notification settings

Kraust/OSCR-server

 
 

Repository files navigation

OSCR-server

django backend for OSCR

OSCR-server is a backend for OSCR with the intent of recording combat log data.

Requirements

see requirements.txt

Generating Ladders

OSCR's base ladders are shipped as Django Fixtures, and additional ladder variants need to be manually created by running a manage.py command.

python3 manage.py genladders

This process happens automatically when running docker compose.

Running

Development

ENABLE_DEBUG=y python3 manage.py migrate
ENABLE_DEBUG=y python3 manage.py runserver

Production

Docker Compose

Docker Compose streamlines running an instance of OSCR on a server. There is a sample docker-compose.yaml file and to run OSCR all that needs to be typed is

docker compose up -d

Stopping OSCR can then be done with

docker compose down

Create the superuser (for django admin):

python3 manage.py createsuperuser

Generating the API Spec

API Specs are packaged along with our releases.

python3 manage.py generate_swagger -f yaml -u http://127.0.0.1 api-spec.yaml

Creating an API Client

Use openapi-generator-cli

openapi-generator-cli generate -g python -o client -i api-spec.yaml \
    --additional-properties=packageName=OSCR_django_client,packageVersion=$(cat VERSION)
cd client
python3 -m build .
python3 -m twine upload dist/*

About

Server side infrastructure for the OSCR parser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 73.4%
  • HTML 23.0%
  • CSS 1.3%
  • Nix 1.3%
  • Other 1.0%