-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 939 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
.PHONY: up
up: ##@development Build and start development environment in background.
docker compose up --build
.PHONY: logs
logs: ##@development Follows development logs [service="svc1 svc2..."].
docker compose logs -f --tail=100 $(service)
.PHONY: shell
shell: ##@development Start a shell session within the container.
docker compose run --rm app /bin/sh
lint_version ?= v1.40-alpine
.PHONY: lint
lint: ##@development Runs static analysis code.
docker run --rm \
-v $(shell pwd):/app \
-w /app \
golangci/golangci-lint:$(lint_version) \
golangci-lint run --timeout 3m
.PHONY: test
test: ##@development Runs the tests.
docker compose run --rm app go test ./...
.PHONY: stop
stop: ##@development Stop development environment and remove containers.
docker compose down -v --remove-orphans
.PHONY: deploy
deploy: ##@production Deploy to heroku.
git push heroku main
.PHONY: deploy_logs
deploy_logs:
heroku logs --tail