-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTaskfile.yaml
49 lines (38 loc) · 1.29 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
version: '3'
env:
POSTGRES: postgres://anordb16user:anordb16password@localhost:5432/anordb16?sslmode=disable
TYPESENSE: http://localhost:8108
MIGRATION_DIR: ./postgres/migrations
tasks:
goose:create:
desc: "creates a migration file"
cmds:
- GOOSE_DRIVER=postgres GOOSE_DBSTRING=$POSTGRES GOOSE_MIGRATION_DIR=$MIGRATION_DIR goose -s create {{.CLI_ARGS}} sql
compose:up:
cmds:
- docker compose -f docker-compose.yaml up -d
compose:down:
cmds:
- docker compose -f docker-compose.yaml down
compose:logs:
cmds:
- docker compose -f docker-compose.yaml logs
compose:restart:
cmds:
- docker compose -f docker-compose.yaml down
- docker compose -f docker-compose.yaml up -d --build --force-recreate --remove-orphans
compose:clean-restart:
cmds:
- task: compose:down
- docker volume rm anor_anor_data
- sudo rm -rf ./_typesense-data
- task: compose:up
- sleep 5s
- task: goose:up
goose:up:
cmds:
- GOOSE_DRIVER=postgres GOOSE_DBSTRING=$POSTGRES goose -dir ./postgres/migrations up
sqlc:generate: sqlc generate
import-dataset:
cmds:
- go run ./cmd/ebay-data-importer/*.go -dataset-dir="./cmd/ebay-data-importer/dataset/" -database=$POSTGRES -typesense=$TYPESENSE {{ .CLI_ARGS}}