-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
83 lines (61 loc) · 1.4 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
78
79
80
81
82
83
# ====== Docker ========
build:
if [ ! -d "runtime" ]; then \
mkdir -p runtime/configs; \
chmod 0777 -R runtime; \
fi
chmod +x bin/get-binaries.sh; \
if [ ! -f "bin/centrifugo" ]; then \
cd bin; \
./get-binaries.sh; \
cd ../; \
fi
if [ ! -d "vendor" ]; then \
composer i --ignore-platform-reqs; \
fi
if [ ! -f "rr" ]; then \
vendor/bin/rr get;\
fi
if [ ! -d ".db" ]; then \
mkdir .db; \
chmod 0777 -R .db; \
bin/dolt --data-dir=.db sql -q "create database buggregator;"; \
fi
docker compose up --no-start;
start:
docker compose up --remove-orphans -d;
up: build start
stop:
docker compose stop;
down:
docker compose down;
restart:
docker compose restart;
list:
docker compose ps;
log-tail:
docker compose logs --tail=50 -f;
pull-latest:
docker compose pull;
build-server:
docker compose build buggregator-server --no-cache;
# ====== Database ========
recreate-db:
rm -rf .db;
mkdir .db;
chmod 0777 -R .db;
bin/dolt --data-dir=.db sql -q "create database buggregator;";
# ======= Runtime ========
cleanup-attachments:
rm -rf runtime/attachments/*;
cleanup-cache:
rm -rf runtime/cache;
cleanup-snapshots:
rm -rf runtime/snapshots;
cleanup: cleanup-attachments cleanup-cache cleanup-snapshots;
# =========================
bash:
docker compose exec buggregator-server /bin/sh;
reset-server:
docker compose exec buggregator-server ./rr reset;
reset: reset-server