Kód pro inventář spolku Herní historie.
Dependencies:
- PostgreSQL database
- Copy
.env_exampleto.envand fill in variables - Copy
alembic.ini_exampletoalembic.iniand fill in PostgreSQL database URL - Run:
uv sync
uv run python dbseed.py
uv run alembic heads
uv run alembic stamp <revision>Where <revision> is the latest Alembic revision shown from alembic heads.
The first registered user should be given admin permissions.
Run with uv run flask run.
uv run flask run --debuguv run fastapi dev rhinventory/api/app.py poetry shell
# Jako git status
alembic current
# Udělal jsem novou tabulku, chci aby jí alembic přemigroval
alembic revision --autogenerate -m "Add File table"
# omrknu alembic/versions/[nová revize].py, jestli tam je to co chci...
# Spustím migraci
alembic upgrade headIf there are no database migrations: run the script ./ops/deploy.sh
If there are database migrations: run the script ./ops/deploy_with_migration.sh
PYTHONPATH=. python scripts/script.py
Try to check logs with sudo journalctl -u www_rhinventory -e. If that's not enough, run manually with:
sudo systemctl stop rhinventory
cd /var/www/rhinventory
sudo -u flask ./deploy.shOnce solved:
sudo systemctl start rhinventoryuv lock --upgrade-package hhfloppy && uv syncThen update the SUPPORTED_EVENT_VERSION in event_store.py.