-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (39 loc) · 1.23 KB
/
Makefile
File metadata and controls
46 lines (39 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: all clear docker hooks local start
# The name of the service you're running
SERVICE := omar
# The port used by the server (FastAPI)
PORT := 8000
# Set the environment mode for the container (can be overridden with `make docker ENVIRONMENT=production`)
ENVIRONMENT ?= development
# 🛠️ Default target
all: local
# 🧘 Run the interactive CLI chat
local:
@echo "[🕯️] Launching $(SERVICE), your spiritual guide... (local-development)"
@uv run cli.py
# 🌐 Run the FastAPI server
start:
@echo "[🤖] Starting $(SERVICE)'s server... (local-development)"
@fastapi dev app/main.py
# 🐳 Run the Dockerized version of the app
docker:
@echo "[🐳] Building and running $(SERVICE) in Docker...(local-development)"
@docker build -t $(SERVICE)-image .
@docker run --rm -it \
-p $(PORT):$(PORT) \
-e ENVIRONMENT=$(ENVIRONMENT) \
$(SERVICE)-image
# ✅ Run all pre-commit hooks
hooks:
@echo "[🧼] Running pre-commit hooks..."
@pre-commit run --all-files
# 🔥 Clean up Python and tooling caches
clear:
@echo "[🧹] Removing cache and compiled files..."
@find . \
\( -name ".mypy_cache" \
-o -name ".pytest_cache" \
-o -name "__pycache__" \
-o -name "*.pyc" \
-o -name "*.pyo" \) \
-exec rm -rf {} +