-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 888 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
37
38
39
40
NAME=jrpg-gang
TAG=latest
REGION=europe-central2
IMAGE=${NAME}:${TAG}
SERVICE=${NAME}
PROJECT=${NAME}
build:
go build -o bin/${NAME} cmd/default/main.go
release:
go build -ldflags "-s -w" -o bin/${NAME} cmd/default/main.go
image-build:
docker build . -t ${IMAGE}
gcloud-setup:
gcloud auth login
gcloud auth configure-docker
gcloud-image-build:
docker build . -t gcr.io/${PROJECT}/${IMAGE}
gcloud-image-push:
docker push gcr.io/${PROJECT}/${IMAGE}
gcloud-image-deploy:
gcloud run deploy ${SERVICE} --project ${PROJECT} --image gcr.io/${PROJECT}/${IMAGE} --region ${REGION}
gcloud-deploy:
gcloud run deploy ${SERVICE} --project ${PROJECT} --source . --region ${REGION}
gcloud-regions:
gcloud compute regions list
item:
cd ./private/ && node ../tools/make-item-or-unit.mjs
certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem