-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
63 lines (53 loc) · 1.66 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
version: "3"
dotenv: [".env"]
silent: true
tasks:
# Run the main app with Turbo repo
app:
cmds:
- turbo run dev --scope="masterbots.ai"
# [After Migrating] Run the hasura backend console (highly recommended for changes)
console:
cmds:
- hasura console --project apps/hasura --admin-secret ${HASURA_GRAPHQL_ADMIN_SECRET}
# [First Step When First Boot] Run the hasura backend (docker desktop must be started first)
boot:
cmds:
- docker compose up -d --build database
- sleep 10
- docker compose up -d --build hasura
- echo "Waiting 30s for postgres and hasura to start ..."
- sleep 30
- task migrate
# Reboot the hasura backend
reboot:
cmds:
- task down
- task boot
# [AFTER applying metadata & migrations] Apply the hasura seeds
seed:
cmds:
- hasura seeds apply --project apps/hasura --admin-secret ${HASURA_GRAPHQL_ADMIN_SECRET}
# Turns on the hasura backend (docker desktop must be started first)
up:
cmds:
- docker compose up -d --build
# Turns off the hasura backend
down:
cmds:
- docker compose down -v --remove-orphans
# Apply the hasura migrations
migrate:
cmds:
- hasura migrate apply --project apps/hasura --admin-secret ${HASURA_GRAPHQL_ADMIN_SECRET}
- hasura metadata apply --project apps/hasura --admin-secret ${HASURA_GRAPHQL_ADMIN_SECRET}
# Reset the hasura backend by going from down, to up, to migrate, to seed
reload:
cmds:
- task down
- docker compose up -d postgres
- sleep 5
- docker compose up -d --build
- docker compose logs -f hasura
- task migrate
- task seed