-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (36 loc) · 966 Bytes
/
Makefile
File metadata and controls
50 lines (36 loc) · 966 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
41
42
43
44
45
46
47
48
49
50
.PHONY: start stop logs restart update backup shell audit check-updates upgrade-deps maintain test build dev
start:
docker compose up -d
stop:
docker compose down
logs:
docker compose logs -f
restart:
docker compose restart
update:
docker compose build && docker compose up -d
backup:
cp -r ./data ./data.backup-$(shell date +%Y%m%d-%H%M%S)
@echo "Backup created"
shell:
docker compose exec sshweb sh
# Development
dev:
npm run dev
build:
npm run build
test:
node --test "tests/**/*.test.js"
# Dependency management
audit:
npm audit
check-updates:
npx npm-check-updates
upgrade-deps:
npx npm-check-updates -u && npm install && npm audit
# Monthly maintenance: audit + check updates + rebuild with latest base image
maintain:
@echo "=== npm audit ===" && npm audit; \
echo "=== outdated packages ===" && npx npm-check-updates; \
echo "=== rebuilding with latest base image ===" && \
docker compose build --pull && docker compose up -d