feat: database with tortoise orm
Python Lint CI / ty (push) Successful in 1m22s
Python Lint CI / ruff (push) Successful in 1m22s
Python Lint CI / ruff-format-check (push) Successful in 1m22s

This commit is contained in:
2026-07-01 11:43:10 +02:00
parent deba8a73f9
commit c93a74b0f4
14 changed files with 248 additions and 1 deletions
+18
View File
@@ -23,6 +23,13 @@ endif
DOCKER ?= podman
APP_EXEC ?= $(DOCKER) compose exec app
APP_RUN ?= $(DOCKER) compose run --rm -it app
TORTOISE ?= $(APP_RUN) uv run tortoise
POSTGRES_EXEC ?= $(DOCKER) compose exec postgres
PSQL_EXEC_BIN ?= $(POSTGRES_EXEC) psql --username="tout-doux" --dbname="tout-doux"
OPEN ?= xdg-open
# DOCS
@@ -75,6 +82,9 @@ stop: docker-compose-down
.PHONY: logs
logs: docker-compose-logs
.PHONY: migrations
migrations: tortoise-makemigrations
# TOOLS
.PHONY: uv-sync
@@ -137,6 +147,14 @@ docker-compose-down-%: ## docker compose down (container)
docker-compose-logs: ## docker compose logs
$(DOCKER) compose logs -f || true
.PHONY: tortoise-%
tortoise-%: .venv ## tortoise (command)
$(TORTOISE) --config-file tortoise-dev.json $*
.PHONY: psql
psql: ## psql
$(PSQL_EXEC_BIN)
.PHONY: release-%
release-%: .venv ## release major/minor/patch
$(UV) version --bump=$*