-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 929 Bytes
/
Copy pathMakefile
File metadata and controls
45 lines (33 loc) · 929 Bytes
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
.PHONY : build local stop-local prod down test network prune clean test
default: build
build:
@echo '### BUILDING GO BINARY'
@go build -o api cmd/api/main.go
run:
@go run cmd/api/main.go
local:
@echo '### STARTING LOCAL DOCKER-COMPOSE'
@cp .env.local .env;
@docker-compose -f docker-compose-local.yml up -d --build
stop-local:
@echo '### STOPPING LOCAL DOCKER-COMPOSE'
@docker-compose -f docker-compose-local.yml down --remove-orphans
dev:
@echo '### LOADING DEV ENV'
@cp .env.dev .env;
@docker-compose -f docker-compose-dev.yml up -d --build
stop-dev:
@echo '### STOPPING DEV DOCKER-COMPOSE'
@docker-compose -f docker-compose-dev.yml down --remove-orphans
test:
@go test -v ./...
api-test:
@go test -v ./cmd/api
network:
@docker network create gym-net
prune:
@echo '### PRUNING DOCKER SYSTEM'
@docker system prune -a
clean:
@docker rm -vf $$(docker ps -aq)
@docker rmi -f $$(docker images -a -q)