-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 815 Bytes
/
Makefile
File metadata and controls
40 lines (28 loc) · 815 Bytes
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
compose-command := docker-compose
# allow CORS access for frontend (e.g. create-react-app)
run: export ALLOWED_FRONTEND_URLS = http://localhost:3000
run: export ENV = dev
run:
poetry run fastapi dev electronic_inv_sys
run-ui:
$(MAKE) -C ui run-local
prepare-build:
$(MAKE) -C ui prepare-build
coverage-cli:
poetry run pytest --cov
coverage-html:
poetry run pytest --cov --cov-report=html:coverage_report
coverage: coverage-html
open 'http://localhost:3000'
# requires npm tool serve
serve --no-port-switching coverage_report/
oauth:
poetry run python oauth.py
# -----
# use docker-compose.yml
# build and deploy the rust container
run-docker: prepare-build stop-docker
$(compose-command) -f docker-compose.yml up -d --build
# helper
stop-docker:
$(compose-command) -f docker-compose.yml down