-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 710 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (28 loc) · 710 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
.PHONY: test
# Define Docker Compose command
DOCKER_COMPOSE := docker-compose
# Docker Compose file
COMPOSE_FILE := ./deployment/docker-compose.yml
# Targets
# Build Docker containers
build:
$(DOCKER_COMPOSE) -f $(COMPOSE_FILE) build
# Run Docker containers
up:
$(DOCKER_COMPOSE) -f $(COMPOSE_FILE) up -d
# Stop Docker containers
down:
$(DOCKER_COMPOSE) -f $(COMPOSE_FILE) down
# Restart Docker containers
restart: down up
# View logs of Docker containers
logs:
$(DOCKER_COMPOSE) -f $(COMPOSE_FILE) logs -f
# Remove Docker containers and associated volumes
clean:
$(DOCKER_COMPOSE) -f $(COMPOSE_FILE) down -v
# Run Test
test:
go test -v -count=1 ./...
# Benchmark Test
benchmark: up test clean