-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
64 lines (58 loc) · 1.48 KB
/
Taskfile.yml
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
version: '3'
dotenv: ['.env']
env:
GOBIN: "{{.TASKFILE_DIR}}/.task/bin"
tasks:
bin:base:
cmds:
- mkdir -p .task/bin
silent: true
generates:
- .task/bin/{{.name}}
install:
deps: [bin:air]
cmds:
- pnpm install --silent
bin:air:
deps: [bin:base]
silent: true
cmds:
- export GOBIN={{.GOBIN}} && go install github.com/air-verse/air@latest
generates:
- .task/bin/air
test:
- test -f .task/bin/air
bin:node_modules:
cmds:
- pnpm install --silent
sources:
- package.json
- pnpm-lock.yaml
generates:
- ./node_modules/
watch:
deps: [watch:ts, watch:server:wait]
watch:ts:
cmds:
- npx vite build -w
watch:server:wait:
cmds:
- sleep 1
- task: watch:server
watch:server:
deps: [bin:air]
cmds:
- .task/bin/air -c .air.toml
db:start:
cmds:
- docker run --name mcmamina -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_DB=$POSTGRES_DB -e POSTGRES_USER=$POSTGRES_USER -v ./.data:/var/lib/postgresql/data -p 5432:5432 -d postgres:alpine
db:stop:
cmds:
- docker stop mcmamina
- docker rm mcmamina
db:up:
cmds:
- migrate -path ./migrations -database "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB?sslmode=disable" up
db:down:
cmds:
- migrate -path ./migrations -database "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB?sslmode=disable" down