forked from ic3software/mccs-alpha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 1.19 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
APP=mccs
GIT_TAG = $(shell if [ "`git describe --tags --abbrev=0 2>/dev/null`" != "" ];then git describe --tags --abbrev=0; else git log --pretty=format:'%h' -n 1; fi)
BUILD_DATE = $(shell TZ=UTC date +%FT%T%z)
GIT_COMMIT = $(shell git log --pretty=format:'%H' -n 1)
GIT_TREE_STATUS = $(shell if git status|grep -q 'clean';then echo clean; else echo dirty; fi)
production:
@echo "=============starting production server============="
GIT_TAG=${GIT_TAG} BUILD_DATE=${BUILD_DATE} GIT_COMMIT=${GIT_COMMIT} GIT_TREE_STATUS=${GIT_TREE_STATUS} \
docker-compose -f docker-compose.production.yml up --build
clean:
@echo "=============removing app============="
rm -f ${APP}
run:
@echo "=============starting server============="
sudo sysctl -w vm.max_map_count=262144
docker-compose -f docker-compose.dev.yml up --build
test:
@echo "=============running test============="
go test ./...
seed:
@echo "=============generating seed data============="
go run cmd/seed/main.go -config="seed"
es-restore:
@echo "=============restoring es data============="
go run cmd/es-restore/main.go -config="seed"
pg-setup:
@echo "=============setup pg accounts============="
go run cmd/pg-setup/main.go -config="seed"