-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
77 lines (58 loc) · 1.35 KB
/
Makefile
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
Makefile:
ifneq (,$(wildcard ./.env))
include .env
export
ENV_FILE_PARAM = --env-file .env
endif
build:
docker compose up --build -d --remove-orphans
up:
docker compose up -d
up-v:
docker compose up
down:
docker compose down
down-v:
docker compose down -v
status:
docker ps -a
show-logs:
docker compose logs
server-logs:
docker compose logs backend
frontend-logs:
docker compose logs frontend
restart:
docker compose restart
prune:
docker system prune
remove-images:
@read -p "WARNING: This will remove all Docker images. Are you sure you want to continue? (y/N) " confirm; \
if [ "$$confirm" = "y" ] || [ "$$confirm" = "Y" ]; then \
docker rmi -f $$(docker images -a -q); \
else \
echo "Operation canceled."; \
fi
stop-container:
@read -p "Enter the container ID to stop: " container_id; \
if [ -n "$$container_id" ]; then \
docker stop $$container_id; \
else \
echo "Container ID is required."; \
fi
remove-container:
@read -p "Enter the container ID to remove: " container_id; \
if [ -n "$$container_id" ]; then \
docker rm $$container_id; \
else \
echo "Container ID is required."; \
fi
install:
pip install --upgrade pip && \
pip install -r packages.txt
format:
find -name '*.py' -exec black {} +
lint:
find . -type f -name '*.py' -print0 | xargs -0 pylint --disable=R,C || true
test:
python -m pytest -vv --cov=tests