-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
91 lines (76 loc) · 2.24 KB
/
Copy pathTaskfile.yml
File metadata and controls
91 lines (76 loc) · 2.24 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3"
includes:
frontend:
taskfile: "./packages/frontend/Taskfile.yml"
dir: "./packages/frontend"
backend:
taskfile: "./packages/backend/Taskfile.yml"
dir: "./packages/backend"
tasks:
default:
cmd: task --list-all
dev:
desc: Start development environment, Ctrl+C stops all
cmds:
- task: dev:setup
- nomad-pack run deploy/dev --var project_root={{.ROOT_DIR}}
- defer: nomad job stop dev || true
- cmd: |-
alloc=$(nomad job allocs -json dev | jq -r '.[] | select(.TaskGroup == "app") | .ID' | head -1)
exec nomad alloc logs -f "$alloc" backend
dev:stop:
desc: Stop all services
cmd: nomad job stop dev || true
dev:status:
desc: Show status of all services
cmd: nomad job status dev
dev:logs:
desc: "Follow logs (usage: task dev:logs -- backend)"
cmd: |-
alloc=$(nomad job allocs -json dev | jq -r --arg t "{{.CLI_ARGS}}" '.[] | select(.TaskStates[$t] != null) | .ID' | head -1)
exec nomad alloc logs -f "$alloc" "{{.CLI_ARGS}}"
dev:destroy:
desc: Destroy all services and data
cmds:
- nomad job stop -purge dev 2>/dev/null || true
- >-
docker volume rm
effect-stack-postgres effect-stack-rustfs
2>/dev/null || true
- docker network rm effect-stack 2>/dev/null || true
dev:reset:
desc: Destroy all data and restart
cmds:
- task: dev:destroy
- task: dev
dev:setup:
internal: true
cmds:
- task: dev:agent
- docker network create effect-stack 2>/dev/null || true
dev:agent:
internal: true
status:
- nomad agent-info > /dev/null 2>&1
cmds:
- mkdir -p .dev
- nohup nomad agent -dev -log-level=warn -bind=127.0.0.1 -config=deploy/nomad-dev.hcl > .dev/nomad.log 2>&1 &
- until nomad agent-info > /dev/null 2>&1; do sleep 1; done
build:
desc: Build all packages
deps:
- frontend:build
typecheck:
desc: Type check all packages
cmd: yarn tsc -b --noEmit
lint:
desc: Lint all packages
deps:
- frontend:lint
- backend:lint
format:
desc: Format code with Prettier
cmd: yarn prettier --write .
format:check:
desc: Check code formatting
cmd: yarn prettier --check .