-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (36 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
56 lines (36 loc) · 1.12 KB
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
50
51
52
53
54
55
56
.PHONY: run test swagger docker-build up-build \
up-core up-all down logs rebuild
## ----------------------------
## APP Commands
## ----------------------------
run:
go run cmd/main.go
test:
go test ./...
swagger:
swag init --parseDependency --parseInternal -g cmd/main.go
## ----------------------------
## Docker APP Commands
## ----------------------------
docker-build:
docker build . -t task-tracker:latest
up-build:
docker-compose -p task-tracker-app up -d
## ----------------------------
## Infrastructure (infra-configs) Commands
## ----------------------------
COMPOSE_CORE=docker-compose -f infra-configs/docker-compose.core.yml
COMPOSE_LOGGING=$(COMPOSE_CORE) -f infra-configs/docker-compose.logging.yml
COMPOSE_CORE_NAME=-p core-task-tracker-app
COMPOSE_LOGGING_NAME =-p all-task-tracker-app
up-core:
$(COMPOSE_CORE) $(COMPOSE_CORE_NAME) up -d
up-all:
$(COMPOSE_LOGGING) $(COMPOSE_LOGGING_NAME) up -d
down:
$(COMPOSE_LOGGING) $(COMPOSE_LOGGING_NAME) down
logs:
docker logs -f filebeat
reload:
$(COMPOSE_LOGGING) $(COMPOSE_LOGGING_NAME) down -v
$(COMPOSE_LOGGING) $(COMPOSE_LOGGING_NAME) up -d