-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·55 lines (44 loc) · 1.18 KB
/
Makefile
File metadata and controls
executable file
·55 lines (44 loc) · 1.18 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
# default target that depends on moveLogs
.DEFAULT_GOAL := main
main: moveLogs run
# cloudflared tunnel run test &> logs/cloudflared.log &
# single backup of logs
moveLogs:
mkdir -p logs || true
mkdir -p .logs_old || true
mv -f logs/* .logs_old/ || true
run: moveLogs
docker compose up -d
docker compose logs -f > logs/docker.log &
setup:
make run
make fixPermissions
make restart
dockerSystemReset:
make stop
docker image prune -a -f
docker volume prune -f
docker network prune -f
docker system prune -a -f --volumes
resetLocal:
make stop || true
stop: moveLogs
docker compose down
restart:
make stop || true
timeout 5.0s make run
fixPermissions:
sudo sh -c ' \
chown -R 999:999 data/mongodb_data logs .logs_old && \
chmod -R 0755 data/mongodb_data && \
[ -d logs ] && chmod -R 0777 logs && \
[ -d .logs_old ] && chmod -R 0777 .logs_old \
'
status:
@echo "============================================================="
@echo "Docker"
@docker ps
@echo "-------------------------------------------------------------"
@echo "Cloudflared"
@pgrep -a cloudflared || echo "Cloudflared is not running."
@echo "============================================================="