feat: database with tortoise orm
This commit is contained in:
@@ -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=$*
|
||||
|
||||
Reference in New Issue
Block a user