-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
60 lines (42 loc) · 1.35 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
registry:=ghcr.io
username:=fajar-islami
image:=fajar_discord_bot
tags:=latest
compile:
go build -o bin/app
run: exportconfig
GOFLAGS=-mod=mod go run main.go
bot:
./bin/go_discord_bot
heroku:
git push heroku master
herokuconfig:
cat .env.prod | xargs heroku config:set
exportconfig:
export $(cat .env | xargs)
push:
git push
make heroku
log:
heroku logs --tail
dockerbuild:
docker build --rm -t ${registry}/${username}/${image}:${tags} .
docker image prune --filter label=stage=dockerbuilder -f
dockerun:
docker run --name ${image} ${registry}/${username}/${image}:${tags}
dockerrm:
docker rm ${registry}/${username}/${image}:${tags} -f
docker rmi ${registry}/${username}/${image}:${tags}
dockerup: ## up compose image
docker compose -f docker-compose-app.yaml up -d
dockerlogs: ## logs compose image
docker compose -f docker-compose-app.yaml logs -f
dockerstop: ## stop compose image
docker compose -f docker-compose-app.yaml stop
dockerdown: ## rm compose image
docker compose -f docker-compose-app.yaml down -v
dockerrm:
docker rm ${registry}/${username}/${image}:${tags} -f
docker rmi ${registry}/${username}/${image}:${tags}
docker run -it --rm ghcr.io/fajar-islami/fajar_discord_bot:0a9e223cca4f10655fece8b611979a6ac84846de bash
docker exec -it ghcr.io/fajar-islami/fajar_discord_bot:0a9e223cca4f10655fece8b611979a6ac84846de /bin/bash