- Website for sharing AoE2 DE recordings of matches.
- Discord Bot gathering events from chat and putting those on the website.
Both currently adjusted for the AoEII ANThology: Ant League 2023 Winter Edition.
Tech stack:
- website backend: Python 3.9
- website frontend: Mint 16.0
- Discord bot: .NET 6.0
cd backend
python -m venv ../Scripts/activate(Windows) OR./bin/activate(Mac/Linux)python -m pip install -r ./requirements.txtcp ./.env.template ./.env- edit
.env:CORS_ALLOW_ORIGIN=*
-
./Scripts/activate(Windows) OR./bin/activate(Mac/Linux) -
Run the backend WITH the database migrations:
python -m main.py -
Run the backend and get the auto-restart experience when backend files are modified:
python uvicorn src.website:app --reload --port 8080Note: this does not migrate the database (see
migration.py)!
Either way will serve the frontend files from the frontend/dist if you open http://localhost:8080.
There are just a few tests. Previously the tricky parts were part of this section but now they are moved to the separate Dicsord bot process.
python -m pytest tests/
cd frontend
- install Mint
cp ./.env.development.template ./.envand adjust the file
mint start --auto-format --env .env
cd bot
dotnet restore- prepare the
bot/Bot/.envfile based on thebot/Bot/.env.template
Run the bot with:
dotnet run
We can avoid all of the development instructions when only the production deployment is needed. For this, just configure few .env files and use docker to start all components:
git submodule update --init --recursivecp ./frontend/.env.production.template ./frontend/.envand adjustcp ./backend/.env.template ./backend/.envand adjustcp ./bot/Bot/.env.template ./bot/Bot/.envand adjustdocker-compose up --build -d
git pull origin master && git submodule update --recursivedocker-compose down && docker-compose up --build -d

