Skip to content

v0.3.1

Latest

Choose a tag to compare

@cassiama cassiama released this 05 Oct 05:37
· 33 commits to main since this release

Highlights:

  • The server now supports connections to a real database. No more "mock" databases! Postgres, SQLite, MySQL, and SQL Server are all confirmed through manual testing to be supported. All database URLs must include the one of the following async drivers:
    • asyncpg (Postgres)
    • aioodbc (SQL Server)
    • aiomysql (MySQL)
    • aiosqlite (SQLite)
  • Also, it is now possible to perform Alembic migrations on the database using the Docker image itself.

What’s Inside:

  • Major refactor of everything related to databases; also modified a bunch of the automated test suite. Nothing to the end user is different (outside of the aforementioned ability to perform database migrations), though.

How to Run:

  • For performing migrations:
docker run --rm -e DB_URL=YOUR_DATABASE_URL licenseguard/license-guard:api-v0.3.1 migrate # Docker Hub
# or
docker run --rm -e DB_URL=YOUR_DATABASE_URL ghcr.io/cassiama/license-guard:api-v0.3.1 migrate # GHCR
  • For running the server:
docker run -p 80:80 --env-file .env licenseguard/license-guard:api-v0.3.1 # Docker Hub
# or
docker run -p 80:80 --env-file .env ghcr.io/cassiama/license-guard:api-v0.3.1 # GHCR

Set at least:

JWT_SECRET_KEY=YOUR_SECRET_KEY
DB_URL=YOUR_DATABASE_URL
# optional:
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30

Breaking Changes:

  • If you fail to provide a URL to an async database, the server will fail to start. It is impossible to use a "mock" database anymore.

Full Changelog: