Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.39 KB

README.md

File metadata and controls

71 lines (50 loc) · 1.39 KB

Backend

Requirements

Getting Started locally

Install :

# Initialize environment
rye pin 3.11
rye sync

# Configure database and other settings, see app/config.py for available settings
mkdir -p instance
${EDITOR} instance/config.cfg

# Create database
rye run flask db upgrade

# Initial data load
rye run flask import assets
rye run flask import players
rye run flask import market  # very long, several hours
rye run flask import market --item 73  # retrieve market history for only one item, much faster for dev

Run :

rye run flask --debug run

Access the backend at http://localhost:5000.

Linter :

rye lint

Tests :

rye test

Getting Started locally with Docker

# Configure database and other settings, see app/config.py for available settings
mkdir -p instance
${EDITOR} instance/config.cfg

# Launch the stack
docker compose up --build

# Initialize the database
docker compose exec  -w /app backend flask db upgrade

# Initial data load
docker compose exec  -w /app backend flask import assets
docker compose exec  -w /app backend flask import players
docker compose exec  -w /app backend flask import market --item 73

Access the backend at http://localhost:8080.