-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (26 loc) · 846 Bytes
/
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
.PHONY: run-dev debug build build-and-run build-dev-docker run-dev-docker deps dev-compose build-dev-compose test-verbose test
RUN_DEV_CMD=go run cmd/main/main.go -APP_ENV=development
deps:
go mod download
run-dev:
$(RUN_DEV_CMD) -DEBUG=false
debug:
$(RUN_DEV_CMD) -DEBUG=true
build:
go build -o bin/spendaro-api cmd/main/main.go
build-and-run: deps build
./bin/spendaro-api -APP_ENV=development -DEBUG=false
build-dev-docker:
docker build -t spendaro-api -f ./docker/Dockerfile.dev .
run-dev-docker:
docker run --name spendaro-api -p 8080:8080 spendaro-api
# Docker Compose
dev-compose:
cd ./docker && docker-compose -p spendaro -f docker-compose-dev.yaml up -d
build-dev-compose:
cd ./docker && docker-compose -p spendaro -f docker-compose-dev.yaml up --build -d
# Tests
test-verbose:
go test -v ./...
test:
go test ./...