-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (42 loc) · 1.75 KB
/
Copy pathMakefile
File metadata and controls
60 lines (42 loc) · 1.75 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: install lint lint-fix test \
run-dev run-prod docker-build docker-test \
dc-up dc-down dc-build dc-shell \
pre-commit-install clean
# ── Local development ─────────────────────────────────────────────────────────
install:
pip install -r requirements.txt
lint:
ruff check .
black --check .
isort --check .
lint-fix:
ruff check --fix .
black .
isort .
test:
pytest --tb=short -v
pre-commit-install:
pre-commit install
# ── App Docker (prod/dev/test images) ─────────────────────────────────────────
run-dev:
docker compose --profile dev up --build
run-prod:
docker compose --profile prod up --build
docker-test:
docker compose --profile test up --build
docker-build:
docker build -f Dockerfile-prod -t sample_2:latest .
# ── Devcontainer ──────────────────────────────────────────────────────────────
dc-build:
docker compose -f .devcontainer/docker-compose.yml build
dc-up:
docker compose -f .devcontainer/docker-compose.yml up -d
dc-down:
docker compose -f .devcontainer/docker-compose.yml down
dc-shell:
docker exec -it sample_code_2_devcontainer bash
# ── Cleanup ───────────────────────────────────────────────────────────────────
clean:
find . -type d -name __pycache__ -exec rm -rf {} +
find . -name "*.pyc" -delete
rm -rf .pytest_cache dist build