-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 1 KB
/
Makefile
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
# Application
# ------------------------------------------------------------
.PHONY : build, up, down, test
build :
docker compose --profile threadbare build
up :
docker compose --profile api --force-recreate --detach
down :
docker compose --profile db --profile threadbare down
test :
go test -v ./...
# Database
# ------------------------------------------------------------
.PHONY : migration, db-up, db-down
migration :
@read -p "What is the slug for the migration? " migration;\
migrate create -dir common/db/migrations -ext sql -seq $$migration
db-up :
@echo "Migrating to current version of database"
migrate -database "$(DBSTR_LOCAL)" -path common/db/migrations up
db-down :
migrate -database "$(DBSTR_LOCAL)" -path common/db/migrations down 1
# Deploy
# ------------------------------------------------------------
.PHONY : deploy
deploy : export THREADBARE_VERSION=release
deploy :
docker compose --profile threadbare build --parallel
docker push ghcr.io/hepplerj/threadbare-crawler:release