-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (61 loc) · 1.66 KB
/
Copy pathMakefile
File metadata and controls
79 lines (61 loc) · 1.66 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!make
APP_HOST ?= 0.0.0.0
APP_PORT ?= 8080
EXTERNAL_APP_PORT ?= ${APP_PORT}
LOG_LEVEL ?= warning
run = docker compose run --rm \
-p ${EXTERNAL_APP_PORT}:${APP_PORT} \
-e APP_HOST=${APP_HOST} \
-e APP_PORT=${APP_PORT} \
app
runtests = docker compose -f compose.yml -f compose.tests.yml run --rm tests
.PHONY: image
image:
docker compose build
.PHONY: image-tests
image-tests:
docker compose -f compose.yml -f compose.tests.yml build
.PHONY: docker-run
docker-run: image
docker compose up
.PHONY: docker-run-nginx-proxy
docker-run-nginx-proxy: image
docker compose -f compose.yml -f compose.nginx.yml up
.PHONY: docker-down
docker-down:
docker compose down
.PHONY: docker-down-nginx
docker-down-nginx:
docker compose -f compose.yml -f compose.nginx.yml down
.PHONY: docker-down-tests
docker-down-tests:
docker compose -f compose.yml -f compose.tests.yml down
.PHONY: docker-down-all
docker-down-all:
docker compose down
docker compose -f compose.yml -f compose.nginx.yml down
docker compose -f compose.yml -f compose.tests.yml down
.PHONY: docker-shell
docker-shell:
$(run) /bin/bash
.PHONY: test
test:
$(runtests) /bin/bash -c 'export && python -m pytest /app/tests/ --log-cli-level $(LOG_LEVEL)'
.PHONY: test-catalogs
test-catalogs:
$(runtests) python -m pytest /app/tests/extensions/test_catalogs.py -v --log-cli-level $(LOG_LEVEL)
.PHONY: run-database
run-database:
docker compose run --rm database
.PHONY: load-joplin
load-joplin:
python scripts/ingest_joplin.py http://localhost:8082
.PHONY: install
install:
uv sync --dev
.PHONY: pytest
pytest: install
uv run pytest
.PHONY: docs
docs:
uv run --group docs mkdocs build -f docs/mkdocs.yml