-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
62 lines (51 loc) · 1.67 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
version: '2'
tasks:
init-db:
desc: run migrations seeds and generate orm files at once
cmds:
- task: up-migrations
- task: seed
#- task: boiler
reset-db:
desc: refresh migrations
cmds:
- task: down-migrations
- task: up-migrations
- task: seed
up-migrations:
desc: run database migrations
cmds:
- migrate -verbose -path ./migrations -database postgres://docker:docker@192.168.99.100:5432/docker?sslmode=disable up
boiler:
desc: generate orm
cmds:
- sqlboiler --output="./mp-golang/orm/models" --config="sqlboiler.toml" --wipe --add-global-variants --no-tests --no-hooks psql
down-migrations:
desc: run database migrations down
cmds:
- migrate -verbose -path ./migrations -database postgres://docker:docker@192.168.99.100:5432/docker?sslmode=disable down
drop-migrations:
desc: run database migrations down
cmds:
- migrate -verbose -path ./migrations -database postgres://docker:docker@192.168.99.100:5432/docker?sslmode=disable drop
seed:
desc: seed database with fake data
dir: ./seeds
cmds:
- npm run seed:run
run:
desc: run fastify application
dir: ./mp-fastify
cmds:
- npm run dev
pb:
desc: generate nodejs and golang files from protobuf
dir: ./proto
cmds:
- protoc -I ./ ./* --go_out=plugins=grpc:../mp-golang/orm/ormpb/
#- protoc --js_out=import_style=commonjs,binary:./mp-fastify/+pb/ orm.proto
- grpc_tools_node_protoc ./* --js_out=import_style=commonjs,binary:../mp-fastify/+pb/ --grpc_out=plugin=protoc-gen-grpc:../mp-fastify/+pb/
evans:
desc: evans repl
cmds:
- evans -p 50051 -r