simple engine build with Django & DRF framework for play-by-forum strategy games
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
requirements
settings
system_templates
urls
.gitignore
Dockerfile
README.md
docker-compose.yml
manage.py
setup.cfg
wsgi.py

README.md

PBF ENGINE BACKEND

API Docs

API Docs can be found at http://<host>/v1/docs Make sure that you set up the INCLUDE_DOCS_URL in settings to True

Development environment

  1. Depends on your platform install docker and docker-compose;
  2. Run: docker-compose build in the repo root;
  3. Run: docker-composer up -d in the repor root;
  4. Go to: http:/localhost:8080/v1/ or whatever endpoint you want to use;

How to migrate

  1. Go to the docker in app-api (first command in useful commands below);
  2. Run: python manage.py makemigrations
  3. Run: python manage.py migrate

You can execute this commands also directly using the docker exec;

Staticfiles

(Maybe someday someone will automate it)

  1. Go to the docker in app-api (first command in useful commands below);
  2. Run: python manage.py collectstatic

Documentation

To use ./generate_docs.sh you should install the aglio: npm -g install aglio on your machine.

Useful commands

  1. docker-compose exec app-api sh - run the terminal inside the docker;
  2. Inside docker: python manage.py add_api_client will create API client for you; The value returned should be used in the headers: APP-CLIENT-ID and APP-TOKEN