forked from sea-compfest/seapay-microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (37 loc) · 1.58 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SEAPAY_VERSION=0.0.1
DB_NAME="sea_pay_dev"
TEST_DB_NAME="sea_pay_dev_test"
DB_PORT=5432
TEST_DB_PORT=5432
all: clean db-setup testdb-setup build test
db-setup: db-create db-migrate
db-drop:
dropdb -p $(DB_PORT) --if-exists -Upostgres $(DB_NAME)
db-create:
createdb -p $(DB_PORT) -Opostgres -Eutf8 $(DB_NAME)
db-migrate:
./gradlew migrateDb
testdb-setup: testdb-create testdb-migrate
testdb-create: testdb-drop
createdb -p $(TEST_DB_PORT) -Opostgres -Eutf8 $(TEST_DB_NAME)
testdb-migrate:
APP_ENVIRONMENT=test ./gradlew migrateTestDb
testdb-drop:
dropdb -p $(TEST_DB_PORT) --if-exists -Upostgres $(TEST_DB_NAME)
run-monolith:
bash -c "set -a && source ./environtment.monolith.sample && set +a && java -jar ./seapay-monolith/build/libs/seapay-monolith-$(SEAPAY_VERSION)-all.jar"
run-gateway:
bash -c "set -a && source ./environtment.gateway.sample && set +a && java -jar ./seapay-gateway-service/build/libs/seapay-gateway-service-$(SEAPAY_VERSION)-all.jar"
run-user:
bash -c "set -a && source ./environtment.user.sample && set +a && java -jar ./seapay-user-service/build/libs/seapay-user-service-$(SEAPAY_VERSION)-all.jar"
run-wallet:
bash -c "set -a && source ./environtment.wallet.sample && set +a && java -jar ./seapay-wallet-service/build/libs/seapay-wallet-service-$(SEAPAY_VERSION)-all.jar"
run-transaction:
bash -c "set -a && source ./environtment.transaction.sample && set +a && java -jar ./seapay-transaction-service/build/libs/seapay-transaction-service-$(SEAPAY_VERSION)-all.jar"
.PHONY: test
test:
APP_ENVIRONMENT=TEST ./gradlew test
build:
./gradlew build
clean:
./gradlew clean