-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 1.04 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
include .env
run-api:
go run cmd/api/main.go
docker-build:
docker build -t go-example:deploy -f docker/Dockerfile .
docker-up:
docker-compose up -d
docker-down:
docker-compose down
docker-up-deploy:
docker-compose -f docker-compose.deploy.yaml up -d
migrate-create:
migrate create -ext sql -dir migrations/postgres -seq ${TABLE_NAME}
migrate-up:
migrate --verbose -database "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DATABASE}?sslmode=disable" -path migrations/postgres up
migrate-down:
migrate --verbose -database "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DATABASE}?sslmode=disable" -path migrations/postgres down
migrate-force:
migrate --verbose -database "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DATABASE}?sslmode=disable" -path migrations/postgres force ${V}
linter:
@echo Starting linters
golangci-lint run ./...
mock:
mockgen -source=${SUR} -destination=${DES} -package=mock
test:
go test -coverpkg=./... ./...