-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (52 loc) · 2 KB
/
Makefile
File metadata and controls
68 lines (52 loc) · 2 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
export COMPOSE := docker compose
override COMPOSE_FILE := compose.develop.yaml
export COMPOSE_FILE
# This is used in the compose files:
export DL_VERSION := $(shell cat VERSION)
default:
@echo ""
@echo "make # List available make targets"
@echo "make setup # Set up servers (builds development images)"
@echo "make start # Start servers"
@echo "make stop # Stop servers"
@echo "make reset # Stop and start servers"
@echo "make build # Build release images"
@echo "make empty # Delete database backups"
@echo "make logs # Show backend processor logs (requires grep)"
@echo "make peak # Report peak database memory usage (requires grep)"
@echo "make test # Run tests (requires check-jsonschema, busybox, wget)"
@echo "make tidy # List violations of StrictYAML (requires yamllint)"
@echo "make todo # List inline TODOs in repo (requires grep)"
@echo ""
@${COMPOSE} ls -q | grep dataasee -q && echo " DatAasee is running locally" || echo " DatAasee is NOT running locally"
@echo ""
setup:
@mkdir -p -m 766 backup
# These are temporary secrets for dev and test
@printf "DB_PASS=password\nDL_PASS=password" > secrets.env
@${COMPOSE} --progress=plain build database
@${COMPOSE} --progress=plain build backend
@${COMPOSE} --progress=plain build frontend
start:
@${COMPOSE} --env-file .env --env-file secrets.env up -d
stop:
@${COMPOSE} down
reset:
@$(MAKE) stop --no-print-directory
@$(MAKE) start --no-print-directory
build:
@${COMPOSE} -f compose.package.yaml --progress=plain build
empty:
@${COMPOSE} --env-file .env --env-file secrets.env run --rm database rm -rf /backup/metadatalake
@${COMPOSE} down --volumes
logs:
@${COMPOSE} logs backend --no-log-prefix | sed --unbuffered G | grep -E --color '^([^\s]*)\s|$$'
peak:
@echo "Peak Memory Consumption Database Container:"
@grep VmHWM /proc/$(shell ps ax | grep [c]om.arcadedb.server.ArcadeDBServer | xargs | cut -d' ' -f1)/status
test:
@$(MAKE) -C tests
tidy:
@yamllint .
todo:
@grep --color --exclude-dir=.git -Rnw . -e "TODO"