-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathBudfile
More file actions
executable file
·65 lines (53 loc) · 1.31 KB
/
Budfile
File metadata and controls
executable file
·65 lines (53 loc) · 1.31 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
#!/bin/bash
# NOTE: to use this file, install bud first: https://github.com/dohsimpson/bud
# then run: `bud help`
APP_DIR=apps/web
help() {
echo "TaskTrove Dev Script"
echo ""
echo "Commands:"
echo " dev Start dev server"
echo " run <script> Run pnpm script"
echo " docker-build [tag] Build multi-platform Docker image (AMD64/ARM64)"
}
dev() {
pnpm dev
}
run() {
if [ -z "$1" ]; then
echo "Usage: bud run <script>"
return 1
fi
pnpm run "$1"
}
docker-build() {
local tag="${1:-ghcr.io/dohsimpson/tasktrove:latest}"
echo "Building multi-platform Docker image: $tag"
echo "Platforms: linux/amd64, linux/arm64"
# Build multi-platform image using default builder
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag "$tag" \
--output type=docker \
-f "$APP_DIR"/Dockerfile \
.
}
docker-push() {
local tag="${1:-ghcr.io/dohsimpson/tasktrove:latest}"
docker push "$tag"
}
docker-run() {
docker run -it --rm -p 3000:3000 -v ${APP_DIR}/data:/app/data ghcr.io/dohsimpson/tasktrove
}
rollout() {
kubie exec k3s unsafe kubectl rollout restart deployment tasktrove-demo
}
_stash_and_rebase_and_pnpm_install() {
git stash
git rebase "$1"
pnpm install
}
# Show help when no arguments are provided
if [ $# -eq 0 ]; then
help
fi