49 lines
1.3 KiB
Makefile
49 lines
1.3 KiB
Makefile
PACKAGE_NAME = marypoppins
|
|
VERSION = 1.0.0
|
|
|
|
REGISTRY_HOST = gitwick.net
|
|
IMAGE_REF = $(REGISTRY_HOST)/thatvideoshopguy/matrix-terminal-posthog-cv
|
|
GIT_SHA = $(shell git rev-parse HEAD)
|
|
|
|
.PHONY: help docker-reset uv-update lint format docker-push
|
|
|
|
help: ## Show this help message
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
|
|
|
|
docker-reset: ## Destroy, Build, and Run
|
|
$(MAKE) docker-clean && $(MAKE) docker-build && $(MAKE) docker-run
|
|
|
|
docker-rebuild: ## Stop, Build, and Run
|
|
$(MAKE) docker-down && $(MAKE) docker-build && $(MAKE) docker-run
|
|
|
|
docker-logs: ## Show container logs
|
|
docker compose -f docker-compose.yaml logs -f
|
|
|
|
docker-push: ## Build and push image to the Forgejo registry
|
|
docker buildx build --push -t $(IMAGE_REF):$(GIT_SHA) -t $(IMAGE_REF):latest .
|
|
|
|
|
|
uv-update: ## Update all the python packages
|
|
uv lock --upgrade
|
|
uv sync
|
|
|
|
lint: ## Lint all the python files
|
|
uv run ruff check .
|
|
|
|
format: ## Format all the python files
|
|
uv run ruff format .
|
|
|
|
|
|
# Targets
|
|
|
|
docker-build:
|
|
docker compose -f docker-compose.yaml build
|
|
|
|
docker-run:
|
|
docker compose -f docker-compose.yaml up -d
|
|
|
|
docker-down:
|
|
docker compose -f docker-compose.yaml down -v
|
|
|
|
docker-clean:
|
|
docker compose -f docker-compose.yaml down -v
|