-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
47 lines (33 loc) · 1.2 KB
/
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
37
38
39
40
41
42
43
44
45
46
.DEFAULT_GOAL := run
run:
PORT=8080 DEBUG=ENABLED SHIELDS_URL="http://localhost:9090" go run .
bench:
go run ./benchmark/bench.go
build:
go build -ldflags "-s -w" -o bin/vbr .
docker-build:
docker build \
--label "org.opencontainers.image.source=https://github.com/Nathan13888/VisitorBadgeReloaded" \
-t vbr .
# TODO: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#labelling-container-images
docker tag vbr:latest ghcr.io/nathan13888/vbr:latest
docker-run:
docker run -it --rm -p 80:8080 -p 443:8081 -p 9090:9090 vbr
docker-debug:
docker run -it --rm -p 80:8080 -p 443:8081 -p 9090:9090 --entrypoint bash vbr
publish:
make docker-build
make publish-ghcr
publish-ghcr:
docker push ghcr.io/nathan13888/vbr:latest
docker tag ghcr.io/nathan13888/vbr:latest ghcr.io/nathan13888/vbr:1.2
# TODO: use latest git tag as tag ^^
docker push ghcr.io/nathan13888/vbr:1.2
clean:
# TODO: delete docker environment and all built images
docker compose down
pull-ghcr:
docker pull docker.pkg.github.com/nathan13888/visitorbadgereloaded/vbr:latest
deploy-heroku:
# TODO: set scaling settings, check heroku branch exists
git push heroku master