chore: add makefile integration and documentation

Signed-off-by: Tobias O <tobias.olenyi@envipath.com>
This commit is contained in:
2025-10-03 14:06:25 +13:00
parent b7e4abae1c
commit d8dc9598ff
2 changed files with 13 additions and 70 deletions

View File

@ -1,4 +1,4 @@
.PHONY: help setup db-up db-down migrate bootstrap dev shell clean
.PHONY: help setup db-up db-down migrate bootstrap build-css collect-static dev shell clean
help: ## Show this help message
@echo 'Usage: make [target]'
@ -20,10 +20,15 @@ db-down: ## Stop PostgreSQL database
@echo "Stopping PostgreSQL database..."
@docker compose down
js-deps: ## Install Frontenddependencies
js-deps: ## Install frontend dependencies
@echo "Installing frontend dependencies..."
@pnpm install
build-css: js-deps ## Build Tailwind CSS for production (minified)
@echo "Building Tailwind CSS..."
@pnpm run build
@echo "✓ CSS built successfully"
migrate: ## Run database migrations
@echo "Running migrations..."
@uv run python manage.py migrate
@ -40,9 +45,14 @@ bootstrap: ## Bootstrap initial data (anonymous user, packages, models)
@echo " Email: admin@envipath.com"
@echo " Password: SuperSafe"
dev: db-up js-deps
dev: db-up js-deps ## Start development server with auto CSS watcher
@uv run python manage.py runserver
collect-static: build-css ## Build CSS and collect all static files for production
@echo "Collecting static files..."
@uv run python manage.py collectstatic --noinput
@echo "✓ Static files collected successfully"
shell: ## Open Django shell
@uv run python manage.py shell