-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 923 Bytes
/
Makefile
File metadata and controls
53 lines (37 loc) · 923 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
ifneq (,$(wildcard ./.env))
include .env
export
endif
PROJECT_ROOT := $(shell pwd)
BINARY_NAME=go-auth
DOCKER_IMAGE=go-auth:latest
.PHONY: build test run gen-ent init create-superuser jwks-refresh clean docker-build docker-up docker-down
build:
@go mod tidy
@go mod vendor
@go build -o ./bin/$(BINARY_NAME) .
run: build
@./bin/$(BINARY_NAME) server
init: build
@./bin/$(BINARY_NAME) init --config ./configs/rbac-config.yaml
create-superuser: build
@./bin/$(BINARY_NAME) admin create-superuser \
--email test@go-auth.local \
--first-name Admin \
--last-name User \
--password test123
jwks-refresh: build
@./bin/$(BINARY_NAME) jobs jwks-refresh --interval 12h
test:
@go test -v ./...
gen-ent:
@go generate ./ent
clean:
@rm -f ./bin/$(BINARY_NAME)
@rm -rf vendor/
docker-build:
@docker build -t $(DOCKER_IMAGE) .
docker-up:
@docker-compose up -d
docker-down:
@docker-compose down