forked from friouimeher1/boiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (35 loc) · 939 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
watch: godeps
ifeq (, $(shell which wtc))
go get github.com/rafaelsq/wtc
endif
@wtc
run: godeps
@go run cmd/server/server.go
gen: godeps
go generate ./...
update-graphql-schema: godeps
gqlgen
godeps:
ifeq (, $(shell which msgp))
go get github.com/tinylib/msgp
endif
ifeq (, $(shell which gqlgen))
go get github.com/99designs/gqlgen
endif
ifeq (, $(shell which mockgen))
go get github.com/golang/mock/mockgen
endif
start-deps:
@if [ ! "`docker ps -q -f name=memcached`" ]; then \
docker run --name memcached -p 11211:11211 -d --restart=always memcached; \
fi
@if [ ! "`docker ps -q -f name=boilerdb`" ]; then \
if [ "`docker ps -aq -f status=exited -f name=boilerdb`" ]; then \
docker rm boilerdb; \
fi; \
docker run -d -p 3307:3306 --name=boilerdb \
-v ${PWD}/../boilerdb:/var/lib/mysql \
-v ${PWD}/schema.sql:/docker-entrypoint-initdb.d/schema.sql \
-e MYSQL_ROOT_PASSWORD=boiler \
mariadb; \
fi