-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 898 Bytes
/
Makefile
File metadata and controls
43 lines (34 loc) · 898 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
.PHONY: clean critic security lint test build run
APP_NAME = apiserver
BUILD_DIR = $(PWD)/build
MIGRATIONS_FOLDER = $(PWD)/platform/migrations
DATABASE_URL = mysql://root:123456@tcp(localhost:3306)/mysqldb?multiStatements=true
migrate.up:
migrate -path $(MIGRATIONS_FOLDER) -database "$(DATABASE_URL)" up
migrate.down:
migrate -path $(MIGRATIONS_FOLDER) -database "$(DATABASE_URL)" down
docker.fiber.build:
docker build -t fiber .
docker.fiber: docker.fiber.build
docker run --rm -d \
--name cgapp-fiber \
--network dev-network \
-p 5000:5000 \
fiber
docker.mysql:
docker run -itd \
--name go-mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-e MYSQL_USER=user \
-e MYSQL_PASSWORD=password \
-e MYSQL_DATABASE=mysqldb \
-p 3306:3306 \
mysql:8.0
docker.redis:
docker run --rm -d \
--name cgapp-redis \
--network dev-network \
-p 6379:6379 \
redis
swag:
swag init