-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
107 lines (105 loc) · 3.17 KB
/
Copy pathTaskfile.yml
File metadata and controls
107 lines (105 loc) · 3.17 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "3"
includes:
webhook:
taskfile: cmd/webhook/Webhook.yml
dir: cmd/webhook
bff:
taskfile: cmd/bff/Bff.yml
dir: cmd/bff
item:
taskfile: cmd/item/Item.yml
dir: cmd/item
task:
taskfile: cmd/task/Task.yml
dir: cmd/task
team:
taskfile: cmd/team/Team.yml
dir: cmd/team
record:
taskfile: cmd/record/Record.yml
dir: cmd/record
tournament:
taskfile: cmd/tournament/Tournament.yml
dir: cmd/tournament
event:
taskfile: cmd/event/Event.yml
dir: cmd/event
matchmaking:
taskfile: cmd/matchmaking/Matchmaking.yml
dir: cmd/matchmaking
handleMatchmaking:
taskfile: cmd/handleMatchmaking/HandleMatchmaking.yml
dir: cmd/handleMatchmaking
sendEndedTournamentToThirdParty:
taskfile: cmd/sendEndedTournamentToThirdParty/SendEndedTournamentToThirdParty.yml
dir: cmd/sendEndedTournamentToThirdParty
sendEndedEventToThirdParty:
taskfile: cmd/sendEndedEventToThirdParty/SendEndedEventToThirdParty.yml
dir: cmd/sendEndedEventToThirdParty
docs:
taskfile: docs/Docs.yml
dir: docs
aws:
taskfile: infrastructure/aws/Aws.yml
dir: infrastructure/aws
# azure:
# taskfile: infrastructure/azure/Azure.yml
# dir: infrastructure/azure
# oci:
# taskfile: infrastructure/oci/Oci.yml
# dir: infrastructure/oci
tasks:
generate:
dir: ./api
cmds:
- task: sqlc
- protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto
- task: bff:generate
migrate:
dotenv: ["./env/.env.{{.ENV}}"]
cmds:
- atlas schema apply --to "file://migration" -u ${MYSQL_CONN} --dev-url "docker://mysql/8/dev"
requires:
vars: [ENV]
sqlc:
cmds:
- sqlc generate
install-proto:
cmds:
- go install google.golang.org/protobuf/cmd/protoc-gen-go
- go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
run:
dotenv: ["./env/.env.{{.ENV}}"]
deps:
- task: bff:run
- task: item:run
- task: task:run
- task: team:run
- task: record:run
- task: tournament:run
- task: event:run
- task: matchmaking:run
requires:
vars: [ENV]
# Docker compose commands
up:
dotenv: ["./env/.env.{{.ENV}}"]
# Export image url as it is different for each infrastructure
cmds:
- docker-compose --env-file ./env/.env.{{.ENV}} up
requires:
vars: [ENV]
down:
dotenv: ["./env/.env.{{.ENV}}"]
cmds:
- docker-compose --env-file ./env/.env.{{.ENV}} down
requires:
vars: [ENV]
push:
dotenv: ["./env/.env.{{.ENV}}"]
cmds:
- aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 699023400746.dkr.ecr.us-east-1.amazonaws.com
- export IMAGE_URI="{{.REGISTRY_URL}}" && docker-compose --env-file ./env/.env.{{.ENV}} build
- export IMAGE_URI="{{.REGISTRY_URL}}" && docker-compose --env-file ./env/.env.{{.ENV}} push
requires:
vars: [ENV, REGISTRY_URL]