-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (42 loc) · 805 Bytes
/
Makefile
File metadata and controls
55 lines (42 loc) · 805 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
46
47
48
49
50
51
52
53
54
55
.PHONY: dev build run test clean install-air
# Development
dev: install-air
air
# Build
build:
go build -o bin/app main.go
# Run production build
run: build
./bin/app
# Test
test:
go test ./...
test-cover:
go test -cover ./...
# Install Air for hot reloading
install-air:
@which air > /dev/null || go install github.com/cosmtrek/air@latest
# Install dependencies
deps:
go mod tidy
# Clean
clean:
rm -rf bin/
rm -rf tmp/
go clean
# Format code
fmt:
go fmt ./...
# Lint code (requires golangci-lint)
lint:
golangci-lint run
# Setup project
setup: deps
cp .env.example .env || echo "Create .env file manually"
mkdir -p logs
# Docker build
docker-build:
docker build -t imdb-performance-optimization .
# Docker run
docker-run:
docker run -p 5000:5000 imdb-performance-optimization