-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yaml
92 lines (77 loc) · 2.03 KB
/
Taskfile.yaml
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
92
version: '3'
dotenv: [.env.prod, .env]
tasks:
up:
cmds:
- docker-compose --env-file .env.prod up --build
build:
deps: [containers-rmi]
cmds:
- echo "Running docker-compose up"
- docker-compose --env-file ./.env.prod up
rebuild:
deps: [libs, containers-rmi]
cmds:
- echo "Running docker-compose up --build"
- docker-compose --env-file .env.prod up --build
libs:
deps: [libs-go, libs-ts]
cmds:
- echo "Generated libs images ✅"
libs-go:
cmds:
- docker build -f Dockerfile.go.libs -t go/libs .
libs-ts:
cmds:
- docker build -f Dockerfile.ts.libs -t ts/libs .
containers-rmi:
silent: true
cmds:
- echo "Removing old containers..."
- docker rmi -f v2-$TWIRP_GATEWAY
- docker rmi -f v2-$AUTH_BACKEND
- docker rmi -f v2-$HASHMAP_BACKEND
- docker rmi -f v2-$AUTH_FRONTEND
- docker rmi -f v2-$HASHMAP_FRONTEND
env:
TWIRP_GATEWAY: twirp_gateway
AUTH_BACKEND: auth_backend
HASHMAP_BACKEND: hashmap_backend
AUTH_FRONTEND: auth_frontend
HASHMAP_FRONTEND: hashmap_frontend
rust-orm:
cmds:
- cd libs/database && sea-orm-cli generate entity -u postgres://postgres:postgres@localhost/makoto -o src/models --ignore-tables user_tokens,user_data,hashmap_items,hashmap_tags,hashmap_item_tags
# setup db
rust-db:
cmds:
- cd tests/setupdb && go run .
rust-user-test:
deps: [rust-db]
cmds:
- cargo test -p user -- --test-threads=1
go-test:
env:
EMAIL_TEST_DISABLED: true
cmds:
- cd apps/hashmap/internal/utils && go test
- cd apps/auth/internal/utils && go test
protoc-twirp-go:
env:
TWIRP_GO_COMPILE: true
cmds:
- cd libs/grpc && cargo run
protoc-twirp-ts:
env:
TWIRP_TS_COMPILE: true
cmds:
- cd libs/grpc && cargo run
protoc-twirp:
cmds:
- task: protoc-twirp-ts
- task: protoc-twirp-go
grpc-go:
env:
GRPC_GO_COMPILE: true
cmds:
- cd libs/grpc && cargo run